Merge pull request #81774 from ju1m/shorewall_fix_RestartTriggers

shorewall: fix RestartTriggers
This commit is contained in:
Silvan Mosberger 2020-03-06 11:58:35 +01:00 committed by GitHub
commit dc70633913
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -26,13 +26,14 @@ in {
description = "The shorewall package to use."; description = "The shorewall package to use.";
}; };
configs = lib.mkOption { configs = lib.mkOption {
type = types.attrsOf types.str; type = types.attrsOf types.lines;
default = {}; default = {};
description = '' description = ''
This option defines the Shorewall configs. This option defines the Shorewall configs.
The attribute name defines the name of the config, The attribute name defines the name of the config,
and the attribute value defines the content 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 = { 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 ]; systemPackages = [ cfg.package ];
}; };
}; };

View File

@ -26,13 +26,14 @@ in {
description = "The shorewall package to use."; description = "The shorewall package to use.";
}; };
configs = lib.mkOption { configs = lib.mkOption {
type = types.attrsOf types.str; type = types.attrsOf types.lines;
default = {}; default = {};
description = '' description = ''
This option defines the Shorewall configs. This option defines the Shorewall configs.
The attribute name defines the name of the config, The attribute name defines the name of the config,
and the attribute value defines the content 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 = { 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 ]; systemPackages = [ cfg.package ];
}; };
}; };