mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-25 09:36:14 +01:00
Use path
instead of export
in nftables
service on blowhole
Signed-off-by: magic_rb <richard@brezak.sk>
This commit is contained in:
parent
ca4775b49e
commit
52d2b22844
|
@ -262,11 +262,13 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.nftables = {
|
systemd.services.nftables = {
|
||||||
|
path = with pkgs; [
|
||||||
|
nftables iptables bash
|
||||||
|
];
|
||||||
serviceConfig =
|
serviceConfig =
|
||||||
let
|
let
|
||||||
rulesScript = pkgs.writeShellScript "nftables-rules" ''
|
rulesScript = pkgs.writeShellScript "nftables-rules" ''
|
||||||
set -ex
|
set -ex
|
||||||
export PATH=${pkgs.nftables}/bin:${pkgs.iptables}/bin:${pkgs.bash}/bin:$PATH
|
|
||||||
|
|
||||||
tmpfile="$(mktemp)"
|
tmpfile="$(mktemp)"
|
||||||
iptables-save -t filter >> $tmpfile
|
iptables-save -t filter >> $tmpfile
|
||||||
|
@ -289,7 +291,6 @@ in
|
||||||
ExecReload = mkForce rulesScript;
|
ExecReload = mkForce rulesScript;
|
||||||
ExecStop = mkForce (pkgs.writeShellScript "nftables-flush" ''
|
ExecStop = mkForce (pkgs.writeShellScript "nftables-flush" ''
|
||||||
set -ex
|
set -ex
|
||||||
export PATH=${pkgs.nftables}/bin:${pkgs.iptables}/bin:${pkgs.bash}/bin:$PATH
|
|
||||||
|
|
||||||
tmpfile="$(mktemp)"
|
tmpfile="$(mktemp)"
|
||||||
iptables-save -t filter >> $tmpfile
|
iptables-save -t filter >> $tmpfile
|
||||||
|
|
Loading…
Reference in a new issue