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
|
splitString
|
||||||
hasInfix
|
hasInfix
|
||||||
substring
|
substring
|
||||||
|
optionalString
|
||||||
;
|
;
|
||||||
inherit (lib.lists) groupBy;
|
inherit (lib.lists) groupBy;
|
||||||
inherit (lib.attrsets) mapAttrsToList;
|
inherit (lib.attrsets) mapAttrsToList;
|
||||||
@ -56,12 +57,14 @@ let
|
|||||||
name,
|
name,
|
||||||
type,
|
type,
|
||||||
elements ? [ ],
|
elements ? [ ],
|
||||||
|
extraText ? null,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
''
|
''
|
||||||
set ${name} {
|
set ${name} {
|
||||||
type ${type}
|
type ${type}
|
||||||
${if elements != [ ] then "elements = { ${concatStringsSep ", " (builtins.trace elements elements)} }" else ""}
|
${if elements != [ ] then "elements = { ${concatStringsSep ", " (builtins.trace elements elements)} }" else ""}
|
||||||
|
${optionalString (extraText != null) extraText}
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user