2018-06-23 01:31:54 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2013-11-04 08:00:34 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.screen;
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
programs.screen = {
|
2023-10-19 18:26:01 +00:00
|
|
|
enable = lib.mkEnableOption "screen, a basic terminal multiplexer";
|
|
|
|
|
2024-06-27 03:03:01 +00:00
|
|
|
package = lib.mkPackageOption pkgs "screen" { };
|
2013-11-04 08:00:34 +00:00
|
|
|
|
2023-10-19 18:26:01 +00:00
|
|
|
screenrc = lib.mkOption {
|
2024-05-16 13:38:31 +00:00
|
|
|
type = lib.types.lines;
|
|
|
|
default = "";
|
2023-10-19 18:26:01 +00:00
|
|
|
example = ''
|
|
|
|
defscrollback 10000
|
|
|
|
startup_message off
|
2013-11-04 08:00:34 +00:00
|
|
|
'';
|
2023-10-19 18:26:01 +00:00
|
|
|
description = "The contents of {file}`/etc/screenrc` file";
|
2013-11-04 08:00:34 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-16 13:38:31 +00:00
|
|
|
config = lib.mkMerge [
|
|
|
|
(lib.mkIf cfg.enable {
|
|
|
|
environment.etc.screenrc = {
|
|
|
|
text = cfg.screenrc;
|
|
|
|
};
|
|
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
security.pam.services.screen = { };
|
|
|
|
})
|
|
|
|
];
|
2013-11-04 08:00:34 +00:00
|
|
|
}
|