summary refs log tree commit diff
path: root/nixos/modules/programs/screen.nix
blob: 4fd800dbae79ac27dd146a55f5ce2471cc793b0e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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 ];
  };

}