mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-21 23:54:22 +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 = {
|
||||
path = with pkgs; [
|
||||
nftables iptables bash
|
||||
];
|
||||
serviceConfig =
|
||||
let
|
||||
rulesScript = pkgs.writeShellScript "nftables-rules" ''
|
||||
set -ex
|
||||
export PATH=${pkgs.nftables}/bin:${pkgs.iptables}/bin:${pkgs.bash}/bin:$PATH
|
||||
|
||||
tmpfile="$(mktemp)"
|
||||
iptables-save -t filter >> $tmpfile
|
||||
|
@ -289,7 +291,6 @@ in
|
|||
ExecReload = mkForce rulesScript;
|
||||
ExecStop = mkForce (pkgs.writeShellScript "nftables-flush" ''
|
||||
set -ex
|
||||
export PATH=${pkgs.nftables}/bin:${pkgs.iptables}/bin:${pkgs.bash}/bin:$PATH
|
||||
|
||||
tmpfile="$(mktemp)"
|
||||
iptables-save -t filter >> $tmpfile
|
||||
|
|
Loading…
Reference in a new issue