nixpkgs/nixos/modules/programs/screen.nix
2018-06-23 11:17:10 +02:00

32 lines
525 B
Nix

{ 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 ];
};
}