mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
6afb255d97
these changes were generated with nixq 0.0.2, by running nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix two mentions of the mdDoc function remain in nixos/, both of which are inside of comments. Since lib.mdDoc is already defined as just id, this commit is a no-op as far as Nix (and the built manual) is concerned.
42 lines
1000 B
Nix
42 lines
1000 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.programs.screen;
|
|
in
|
|
|
|
{
|
|
options = {
|
|
programs.screen = {
|
|
enable = lib.mkEnableOption "screen, a basic terminal multiplexer";
|
|
|
|
package = lib.mkPackageOptionMD pkgs "screen" { };
|
|
|
|
screenrc = lib.mkOption {
|
|
type = with lib.types; nullOr lines;
|
|
example = ''
|
|
defscrollback 10000
|
|
startup_message off
|
|
'';
|
|
description = "The contents of {file}`/etc/screenrc` file";
|
|
};
|
|
};
|
|
};
|
|
|
|
config = {
|
|
# TODO: Added in 24.05, remove before 24.11
|
|
assertions = [
|
|
{
|
|
assertion = cfg.screenrc != null -> cfg.enable;
|
|
message = "`programs.screen.screenrc` has been configured, but `programs.screen.enable` is not true";
|
|
}
|
|
];
|
|
} // lib.mkIf cfg.enable {
|
|
environment.etc.screenrc = {
|
|
enable = cfg.screenrc != null;
|
|
text = cfg.screenrc;
|
|
};
|
|
environment.systemPackages = [ cfg.package ];
|
|
security.pam.services.screen = {};
|
|
};
|
|
}
|