diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2024-06-13 00:27:42 -0700 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2024-06-13 00:27:42 -0700 |
commit | 5e8cc86818d4ac793a943273385dbaa0c7424b22 (patch) | |
tree | 2cca2443959e7baded0ed53afe2eafba82189052 /hosts/darkstar/default.nix | |
parent | d9720c573aadaad8b54d32f9a6f1c7dc0ba17ac8 (diff) | |
download | nix-5e8cc86818d4ac793a943273385dbaa0c7424b22.tar nix-5e8cc86818d4ac793a943273385dbaa0c7424b22.tar.gz nix-5e8cc86818d4ac793a943273385dbaa0c7424b22.tar.bz2 nix-5e8cc86818d4ac793a943273385dbaa0c7424b22.tar.lz nix-5e8cc86818d4ac793a943273385dbaa0c7424b22.tar.xz nix-5e8cc86818d4ac793a943273385dbaa0c7424b22.tar.zst nix-5e8cc86818d4ac793a943273385dbaa0c7424b22.zip |
Enable previously added rules
Diffstat (limited to '')
-rw-r--r-- | hosts/darkstar/default.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hosts/darkstar/default.nix b/hosts/darkstar/default.nix index 5208bfd..ae697ca 100644 --- a/hosts/darkstar/default.nix +++ b/hosts/darkstar/default.nix @@ -83,7 +83,9 @@ secrets = { "kea-dhcp4_conf" = {}; + "nftables/forward" = {}; "nftables/ssh" = {}; + "nftables/voip" = {}; }; }; @@ -92,20 +94,26 @@ systemd.services."nftables-extra" = { description = "nftables extra firewall rules"; script = '' + ${pkgs.nftables}/bin/nft -f ${config.sops.secrets."nftables/forward".path} ${pkgs.nftables}/bin/nft -f ${config.sops.secrets."nftables/ssh".path} + ${pkgs.nftables}/bin/nft -f ${config.sops.secrets."nftables/voip".path} ''; serviceConfig = { RemainAfterExit = true; Type = "oneshot"; }; unitConfig = { + ConditionPathExists = config.sops.secrets."nftables/forward".path; ConditionPathExists = config.sops.secrets."nftables/ssh".path; + ConditionPathExists = config.sops.secrets."nftables/voip".path; }; wantedBy = [ "multi-user.target" ]; }; systemd.paths."nftables-extra" = { pathConfig = { + PathExists = config.sops.secrets."nftables/forward".path; PathExists = config.sops.secrets."nftables/ssh".path; + PathExists = config.sops.secrets."nftables/voip".path; }; wantedBy = [ "multi-user.target" ]; }; |