1 { config, lib, pkgs, ... }:
4 cfg = config.programs.screen;
10 enable = lib.mkEnableOption "screen, a basic terminal multiplexer";
12 package = lib.mkPackageOption pkgs "screen" { };
14 screenrc = lib.mkOption {
15 type = lib.types.lines;
21 description = "The contents of {file}`/etc/screenrc` file";
26 config = lib.mkMerge [
28 # TODO: Added in 24.05, remove before 24.11
31 assertion = cfg.screenrc != "" -> cfg.enable;
32 message = "`programs.screen.screenrc` has been configured, but `programs.screen.enable` is not true";
36 (lib.mkIf cfg.enable {
37 environment.etc.screenrc = {
40 environment.systemPackages = [ cfg.package ];
41 security.pam.services.screen = {};