Make it easier to append to the default sudo configuration
This commit is contained in:
parent
e76eb7f1a7
commit
f3c9c83e04
@ -37,7 +37,20 @@ in
|
||||
security.sudo.configFile = mkOption {
|
||||
# Note: if syntax errors are detected in this file, the NixOS
|
||||
# configuration will fail to build.
|
||||
default =
|
||||
description =
|
||||
''
|
||||
This string contains the contents of the
|
||||
<filename>sudoers</filename> file.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
security.sudo.configFile =
|
||||
''
|
||||
# Don't edit this file. Set the NixOS option ‘security.sudo.configFile’ instead.
|
||||
|
||||
@ -56,18 +69,6 @@ in
|
||||
# Users in the "wheel" group can do anything.
|
||||
%wheel ALL=(ALL) ${if cfg.wheelNeedsPassword then "" else "NOPASSWD: ALL, "}SETENV: ALL
|
||||
'';
|
||||
description =
|
||||
''
|
||||
This string contains the contents of the
|
||||
<filename>sudoers</filename> file.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
security.setuidPrograms = [ "sudo" ];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user