mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
treewide: use optional instead of 'then []'
This commit is contained in:
parent
175e9d1f00
commit
933a41a73f
17 changed files with 45 additions and 65 deletions
|
@ -216,10 +216,10 @@ in
|
|||
${concatStringsSep "\n" (
|
||||
lists.flatten (
|
||||
map (
|
||||
rule: if (length rule.commands != 0) then [
|
||||
rule: optionals (length rule.commands != 0) [
|
||||
(map (user: "${toUserString user} ${rule.host}=(${rule.runAs}) ${toCommandsString rule.commands}") rule.users)
|
||||
(map (group: "${toGroupString group} ${rule.host}=(${rule.runAs}) ${toCommandsString rule.commands}") rule.groups)
|
||||
] else []
|
||||
]
|
||||
) cfg.extraRules
|
||||
)
|
||||
)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue