Merge pull request #114465 from ncfavier/master
nixos/getty: add services.getty.extraArgs
This commit is contained in:
commit
f440f9bad7
@ -5,17 +5,16 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.services.getty;
|
cfg = config.services.getty;
|
||||||
|
|
||||||
loginArgs = [
|
baseArgs = [
|
||||||
"--login-program" "${pkgs.shadow}/bin/login"
|
"--login-program" "${pkgs.shadow}/bin/login"
|
||||||
] ++ optionals (cfg.autologinUser != null) [
|
] ++ optionals (cfg.autologinUser != null) [
|
||||||
"--autologin" cfg.autologinUser
|
"--autologin" cfg.autologinUser
|
||||||
] ++ optionals (cfg.loginOptions != null) [
|
] ++ optionals (cfg.loginOptions != null) [
|
||||||
"--login-options" cfg.loginOptions
|
"--login-options" cfg.loginOptions
|
||||||
];
|
] ++ cfg.extraArgs;
|
||||||
|
|
||||||
gettyCmd = extraArgs:
|
gettyCmd = args:
|
||||||
"@${pkgs.util-linux}/sbin/agetty agetty ${escapeShellArgs loginArgs} "
|
"@${pkgs.util-linux}/sbin/agetty agetty ${escapeShellArgs baseArgs} ${args}";
|
||||||
+ extraArgs;
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -54,7 +53,16 @@ in
|
|||||||
will not be invoked with a <option>--login-options</option>
|
will not be invoked with a <option>--login-options</option>
|
||||||
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 {
|
greetingLine = mkOption {
|
||||||
|
Loading…
Reference in New Issue
Block a user