networking/nftables: enable flushRuleset by default if rulset{,File} used
This commit is contained in:
parent
55213b54f0
commit
a1dd69d761
1 changed files with 2 additions and 1 deletions
|
@ -229,7 +229,8 @@ in
|
|||
boot.blacklistedKernelModules = [ "ip_tables" ];
|
||||
environment.systemPackages = [ pkgs.nftables ];
|
||||
networking.networkmanager.firewallBackend = mkDefault "nftables";
|
||||
networking.nftables.flushRuleset = mkDefault (versionOlder config.system.stateVersion "23.11");
|
||||
# versionOlder for backportability, remove afterwards
|
||||
networking.nftables.flushRuleset = mkDefault (versionOlder config.system.stateVersion "23.11" || (cfg.rulesetFile != null || cfg.ruleset != ""));
|
||||
systemd.services.nftables = {
|
||||
description = "nftables firewall";
|
||||
before = [ "network-pre.target" ];
|
||||
|
|
Loading…
Reference in a new issue