nixos/sudo: Drop the sudoers comment for extraRules

All rules are now handled through `extraRules`,
and it is never empty so `optionalString` isn't needed either.
This commit is contained in:
nicoo 2023-09-07 14:36:29 +00:00
parent 717e51a140
commit c11da39117

View file

@ -240,9 +240,7 @@ in
# Keep SSH_AUTH_SOCK so that pam_ssh_agent_auth.so can do its magic.
Defaults env_keep+=SSH_AUTH_SOCK
'')
(optionalString (cfg.extraRules != []) ''
# extraRules
${concatStringsSep "\n" (
(concatStringsSep "\n" (
lists.flatten (
map (
rule: optionals (length rule.commands != 0) [
@ -251,8 +249,7 @@ in
]
) cfg.extraRules
)
)}
'')
) + "\n")
(optionalString (cfg.extraConfig != "") ''
# extraConfig
${cfg.extraConfig}