From 2c7a16d7926cb854a1904464e0ece1c794d341dc Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Wed, 5 Mar 2025 22:36:35 +0000 Subject: [PATCH] firewallgen: add extraText param to set anything in here is added verbatim to the set definition --- pkgs/firewallgen/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/firewallgen/default.nix b/pkgs/firewallgen/default.nix index af5c372..21dc0b8 100644 --- a/pkgs/firewallgen/default.nix +++ b/pkgs/firewallgen/default.nix @@ -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} } '';