2018-06-23 02:31:54 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2013-11-04 08:00:34 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.screen;
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
programs.screen = {
|
2023-10-19 19:26:01 +01:00
|
|
|
enable = lib.mkEnableOption "screen, a basic terminal multiplexer";
|
|
|
|
|
2024-06-27 04:03:01 +01:00
|
|
|
package = lib.mkPackageOption pkgs "screen" { };
|
2013-11-04 08:00:34 +00:00
|
|
|
|
2023-10-19 19:26:01 +01:00
|
|
|
screenrc = lib.mkOption {
|
2024-05-16 14:38:31 +01:00
|
|
|
type = lib.types.lines;
|
|
|
|
default = "";
|
2023-10-19 19:26:01 +01:00
|
|
|
example = ''
|
|
|
|
defscrollback 10000
|
|
|
|
startup_message off
|
2013-11-04 08:00:34 +00:00
|
|
|
'';
|
2023-10-19 19:26:01 +01:00
|
|
|
description = "The contents of {file}`/etc/screenrc` file";
|
2013-11-04 08:00:34 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-16 14:38:31 +01: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
|
|
|
}
|