1
0

firewallgen: add extraText param to set

anything in here is added verbatim to the set definition
This commit is contained in:
Daniel Barlow 2025-03-05 22:36:35 +00:00
parent d6b06abb63
commit 2c7a16d792

View File

@ -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}
}
'';