Improve /etc/sudoers message
This commit is contained in:
parent
0e3e828d92
commit
89697b0fc1
@ -64,7 +64,7 @@ in
|
|||||||
security.sudo.configFile =
|
security.sudo.configFile =
|
||||||
''
|
''
|
||||||
# Don't edit this file. Set the NixOS options ‘security.sudo.configFile’
|
# Don't edit this file. Set the NixOS options ‘security.sudo.configFile’
|
||||||
# and security.sudo.extraConfig instead.
|
# or ‘security.sudo.extraConfig’ instead.
|
||||||
|
|
||||||
# Environment variables to keep for root and %wheel.
|
# Environment variables to keep for root and %wheel.
|
||||||
Defaults:root,%wheel env_keep+=TERMINFO_DIRS
|
Defaults:root,%wheel env_keep+=TERMINFO_DIRS
|
||||||
@ -90,11 +90,10 @@ in
|
|||||||
environment.etc = singleton
|
environment.etc = singleton
|
||||||
{ source =
|
{ source =
|
||||||
pkgs.runCommand "sudoers"
|
pkgs.runCommand "sudoers"
|
||||||
{src = pkgs.writeText "sudoers-in" cfg.configFile; }
|
{ src = pkgs.writeText "sudoers-in" cfg.configFile; }
|
||||||
# Make sure that the sudoers file is syntactically valid.
|
# Make sure that the sudoers file is syntactically valid.
|
||||||
# (currently disabled - NIXOS-66)
|
# (currently disabled - NIXOS-66)
|
||||||
"${pkgs.sudo}/sbin/visudo -f $src -c &&
|
"${pkgs.sudo}/sbin/visudo -f $src -c && cp $src $out";
|
||||||
cp $src $out";
|
|
||||||
target = "sudoers";
|
target = "sudoers";
|
||||||
mode = "0440";
|
mode = "0440";
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user