Merge pull request #114465 from ncfavier/master

nixos/getty: add services.getty.extraArgs
This commit is contained in:
Sandro 2021-04-13 14:56:54 +02:00 committed by GitHub
commit f440f9bad7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,17 +5,16 @@ with lib;
let
cfg = config.services.getty;
loginArgs = [
baseArgs = [
"--login-program" "${pkgs.shadow}/bin/login"
] ++ optionals (cfg.autologinUser != null) [
"--autologin" cfg.autologinUser
] ++ optionals (cfg.loginOptions != null) [
"--login-options" cfg.loginOptions
];
] ++ cfg.extraArgs;
gettyCmd = extraArgs:
"@${pkgs.util-linux}/sbin/agetty agetty ${escapeShellArgs loginArgs} "
+ extraArgs;
gettyCmd = args:
"@${pkgs.util-linux}/sbin/agetty agetty ${escapeShellArgs baseArgs} ${args}";
in
@ -54,7 +53,16 @@ in
will not be invoked with a <option>--login-options</option>
option.
'';
example = "-h darkstar -- \u";
example = "-h darkstar -- \\u";
};
extraArgs = mkOption {
type = types.listOf types.str;
default = [ ];
description = ''
Additional arguments passed to agetty.
'';
example = [ "--nohostname" ];
};
greetingLine = mkOption {