diff options
Diffstat (limited to 'nixpkgs/nixos/modules/programs/screen.nix')
-rw-r--r-- | nixpkgs/nixos/modules/programs/screen.nix | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/programs/screen.nix b/nixpkgs/nixos/modules/programs/screen.nix new file mode 100644 index 000000000000..c1daaa58f16f --- /dev/null +++ b/nixpkgs/nixos/modules/programs/screen.nix @@ -0,0 +1,32 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkOption mkIf types; + cfg = config.programs.screen; +in + +{ + ###### interface + + options = { + programs.screen = { + + screenrc = mkOption { + default = ""; + description = '' + The contents of /etc/screenrc file. + ''; + type = types.lines; + }; + }; + }; + + ###### implementation + + config = mkIf (cfg.screenrc != "") { + environment.etc."screenrc".text = cfg.screenrc; + + environment.systemPackages = [ pkgs.screen ]; + }; + +} |