nixpkgs-suyu/nixos/modules/programs/screen.nix

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

34 lines
572 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2013-11-04 09:00:34 +01:00
let
inherit (lib) mkOption mkIf types;
2013-11-04 09:00:34 +01:00
cfg = config.programs.screen;
in
{
###### interface
options = {
programs.screen = {
screenrc = mkOption {
default = "";
description = lib.mdDoc ''
2013-11-04 09:00:34 +01:00
The contents of /etc/screenrc file.
'';
type = types.lines;
};
};
};
###### implementation
config = mkIf (cfg.screenrc != "") {
2019-08-13 23:52:01 +02:00
environment.etc.screenrc.text = cfg.screenrc;
environment.systemPackages = [ pkgs.screen ];
2020-01-03 16:16:25 +01:00
security.pam.services.screen = {};
2013-11-04 09:00:34 +01:00
};
}