Merge pull request #284627 from Trundle/nftables-ordering

nixos/nftables: remove default systemd dependencies
This commit is contained in:
Will Fancher 2024-02-09 12:29:24 -05:00 committed by GitHub
commit 0cf1e24f32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -252,8 +252,10 @@ in
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" ];
wants = [ "network-pre.target" ];
after = [ "sysinit.target" ];
before = [ "network-pre.target" "shutdown.target" ];
conflicts = [ "shutdown.target" ];
wants = [ "network-pre.target" "sysinit.target" ];
wantedBy = [ "multi-user.target" ];
reloadIfChanged = true;
serviceConfig = let
@ -315,6 +317,7 @@ in
ExecStop = [ deletionsScriptVar cleanupDeletionsScript ];
StateDirectory = "nftables";
};
unitConfig.DefaultDependencies = false;
};
};
}