nixpkgs/nixos/modules/programs/screen.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
750 B
Nix
Raw Normal View History

{
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";
package = lib.mkPackageOption pkgs "screen" { };
2013-11-04 08:00:34 +00:00
2023-10-19 18:26:01 +00:00
screenrc = lib.mkOption {
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
};
};
};
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
}