diff options
author | Silvan Mosberger <contact@infinisil.com> | 2020-03-06 11:58:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-06 11:58:35 +0100 |
commit | dc706339130d34ccb7ce28ca22a496a417f476ea (patch) | |
tree | 044ef617d2f295d21025f5126c65a44a1375685b /nixos | |
parent | b791e6cbddeb5762bea2493a256e86f77a004f98 (diff) | |
parent | 47f27938e75eecf31621e4ada1c65e5c9d4bf244 (diff) | |
download | nixpkgs-dc706339130d34ccb7ce28ca22a496a417f476ea.tar nixpkgs-dc706339130d34ccb7ce28ca22a496a417f476ea.tar.gz nixpkgs-dc706339130d34ccb7ce28ca22a496a417f476ea.tar.bz2 nixpkgs-dc706339130d34ccb7ce28ca22a496a417f476ea.tar.lz nixpkgs-dc706339130d34ccb7ce28ca22a496a417f476ea.tar.xz nixpkgs-dc706339130d34ccb7ce28ca22a496a417f476ea.tar.zst nixpkgs-dc706339130d34ccb7ce28ca22a496a417f476ea.zip |
Merge pull request #81774 from ju1m/shorewall_fix_RestartTriggers
shorewall: fix RestartTriggers
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/networking/shorewall.nix | 5 | ||||
-rw-r--r-- | nixos/modules/services/networking/shorewall6.nix | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/nixos/modules/services/networking/shorewall.nix b/nixos/modules/services/networking/shorewall.nix index c59a5366915..16383be2530 100644 --- a/nixos/modules/services/networking/shorewall.nix +++ b/nixos/modules/services/networking/shorewall.nix @@ -26,13 +26,14 @@ in { description = "The shorewall package to use."; }; configs = lib.mkOption { - type = types.attrsOf types.str; + type = types.attrsOf types.lines; default = {}; description = '' This option defines the Shorewall configs. The attribute name defines the name of the config, and the attribute value defines the content of the config. ''; + apply = lib.mapAttrs (name: text: pkgs.writeText "${name}" text); }; }; }; @@ -62,7 +63,7 @@ in { ''; }; environment = { - etc = lib.mapAttrs' (name: conf: lib.nameValuePair "shorewall/${name}" {text=conf;}) cfg.configs; + etc = lib.mapAttrs' (name: conf: lib.nameValuePair "shorewall/${name}" {source=conf;}) cfg.configs; systemPackages = [ cfg.package ]; }; }; diff --git a/nixos/modules/services/networking/shorewall6.nix b/nixos/modules/services/networking/shorewall6.nix index 374e407cc7a..e081aedc6c3 100644 --- a/nixos/modules/services/networking/shorewall6.nix +++ b/nixos/modules/services/networking/shorewall6.nix @@ -26,13 +26,14 @@ in { description = "The shorewall package to use."; }; configs = lib.mkOption { - type = types.attrsOf types.str; + type = types.attrsOf types.lines; default = {}; description = '' This option defines the Shorewall configs. The attribute name defines the name of the config, and the attribute value defines the content of the config. ''; + apply = lib.mapAttrs (name: text: pkgs.writeText "${name}" text); }; }; }; @@ -62,7 +63,7 @@ in { ''; }; environment = { - etc = lib.mapAttrs' (name: conf: lib.nameValuePair "shorewall6/${name}" {text=conf;}) cfg.configs; + etc = lib.mapAttrs' (name: conf: lib.nameValuePair "shorewall6/${name}" {source=conf;}) cfg.configs; systemPackages = [ cfg.package ]; }; }; |