mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
nixos/opensnitch: include systemd unit
This commit is contained in:
parent
3592034595
commit
d8da97c3fe
@ -5,6 +5,8 @@
|
||||
, libnetfilter_queue
|
||||
, libnfnetlink
|
||||
, lib
|
||||
, coreutils
|
||||
, iptables
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
@ -32,6 +34,12 @@ buildGoModule rec {
|
||||
|
||||
postBuild = ''
|
||||
mv $GOPATH/bin/daemon $GOPATH/bin/opensnitchd
|
||||
mkdir -p $out/lib/systemd/system
|
||||
substitute opensnitchd.service $out/lib/systemd/system/opensnitchd.service \
|
||||
--replace "/usr/local/bin/opensnitchd" "$out/bin/opensnitchd" \
|
||||
--replace "/etc/opensnitchd/rules" "/var/lib/opensnitch/rules" \
|
||||
--replace "/bin/mkdir" "${coreutils}/bin/mkdir"
|
||||
sed -i '/\[Service\]/a Environment=PATH=${iptables}/bin' $out/lib/systemd/system/opensnitchd.service
|
||||
'';
|
||||
|
||||
vendorSha256 = "sha256-LMwQBFkHg1sWIUITLOX2FZi5QUfOivvrkcl9ELO3Trk=";
|
||||
|
Loading…
Reference in New Issue
Block a user