mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 20:55:31 +03:00
nixos/sudo: Split up configFile
into individual sections
This commit is contained in:
parent
74b1db5164
commit
409d29ca73
1 changed files with 12 additions and 6 deletions
|
@ -205,17 +205,20 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
security.sudo.configFile =
|
security.sudo.configFile = concatStringsSep "\n" [
|
||||||
''
|
''
|
||||||
# Don't edit this file. Set the NixOS options ‘security.sudo.configFile’
|
# Don't edit this file. Set the NixOS options ‘security.sudo.configFile’
|
||||||
# or ‘security.sudo.extraRules’ instead.
|
# or ‘security.sudo.extraRules’ instead.
|
||||||
|
''
|
||||||
|
''
|
||||||
# Keep SSH_AUTH_SOCK so that pam_ssh_agent_auth.so can do its magic.
|
# Keep SSH_AUTH_SOCK so that pam_ssh_agent_auth.so can do its magic.
|
||||||
Defaults env_keep+=SSH_AUTH_SOCK
|
Defaults env_keep+=SSH_AUTH_SOCK
|
||||||
|
''
|
||||||
|
''
|
||||||
# "root" is allowed to do anything.
|
# "root" is allowed to do anything.
|
||||||
root ALL=(ALL:ALL) SETENV: ALL
|
root ALL=(ALL:ALL) SETENV: ALL
|
||||||
|
''
|
||||||
|
''
|
||||||
# extraRules
|
# extraRules
|
||||||
${concatStringsSep "\n" (
|
${concatStringsSep "\n" (
|
||||||
lists.flatten (
|
lists.flatten (
|
||||||
|
@ -227,9 +230,12 @@ in
|
||||||
) cfg.extraRules
|
) cfg.extraRules
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
|
''
|
||||||
|
''
|
||||||
|
# extraConfig
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
'';
|
''
|
||||||
|
];
|
||||||
|
|
||||||
security.wrappers = let
|
security.wrappers = let
|
||||||
owner = "root";
|
owner = "root";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue