mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
Improve /etc/sudoers message
This commit is contained in:
parent
0e3e828d92
commit
89697b0fc1
@ -64,7 +64,7 @@ in
|
||||
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.
|
||||
Defaults:root,%wheel env_keep+=TERMINFO_DIRS
|
||||
@ -90,11 +90,10 @@ in
|
||||
environment.etc = singleton
|
||||
{ source =
|
||||
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.
|
||||
# (currently disabled - NIXOS-66)
|
||||
"${pkgs.sudo}/sbin/visudo -f $src -c &&
|
||||
cp $src $out";
|
||||
"${pkgs.sudo}/sbin/visudo -f $src -c && cp $src $out";
|
||||
target = "sudoers";
|
||||
mode = "0440";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user