firewallgen: add extraText param to set
anything in here is added verbatim to the set definition
This commit is contained in:
parent
d6b06abb63
commit
2c7a16d792
@ -10,6 +10,7 @@ let
|
||||
splitString
|
||||
hasInfix
|
||||
substring
|
||||
optionalString
|
||||
;
|
||||
inherit (lib.lists) groupBy;
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
@ -56,12 +57,14 @@ let
|
||||
name,
|
||||
type,
|
||||
elements ? [ ],
|
||||
extraText ? null,
|
||||
...
|
||||
}:
|
||||
''
|
||||
set ${name} {
|
||||
type ${type}
|
||||
${if elements != [ ] then "elements = { ${concatStringsSep ", " (builtins.trace elements elements)} }" else ""}
|
||||
${optionalString (extraText != null) extraText}
|
||||
}
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user