@@ -46,6 +46,14 @@ in
46 <filename>sudoers</filename> file.
46 <filename>sudoers</filename> file.
50+ security.sudo.extraConfig = mkOption {
54+ Extra configuration text appended to <filename>sudoers</filename>.
@@ -55,7 +63,8 @@ in
56 security.sudo.configFile =
64 security.sudo.configFile =
58− # Don't edit this file. Set the NixOS option ‘security.sudo.configFile’ instead.
66+ # Don't edit this file. Set the NixOS options ‘security.sudo.configFile’
67+ # and security.sudo.extraConfig instead.
60 # Environment variables to keep for root and %wheel.
69 # Environment variables to keep for root and %wheel.
61 Defaults:root,%wheel env_keep+=TERMINFO_DIRS
70 Defaults:root,%wheel env_keep+=TERMINFO_DIRS
@@ -69,6 +78,7 @@ in
70 # Users in the "wheel" group can do anything.
79 # Users in the "wheel" group can do anything.
71 %wheel ALL=(ALL) ${if cfg.wheelNeedsPassword then "" else "NOPASSWD: ALL, "}SETENV: ALL
80 %wheel ALL=(ALL) ${if cfg.wheelNeedsPassword then "" else "NOPASSWD: ALL, "}SETENV: ALL
74 security.setuidPrograms = [ "sudo" "sudoedit" ];
84 security.setuidPrograms = [ "sudo" "sudoedit" ];