Files
nix-config/common/opensnitch/default.nix
2021-08-06 21:08:53 -04:00

25 lines
669 B
Nix

{ pkgs, ... }:
{
systemd = {
services = {
opensnitch = {
description = "Opensnitch Application Firewall Daemon";
wants = [ "network.target" ];
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.iptables ];
serviceConfig = {
Type = "simple";
PermissionsStartOnly = true;
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p /etc/opensnitch/rules";
ExecStart = "${pkgs.opensnitch}/bin/opensnitchd -rules-path /etc/opensnitch/rules";
Restart = "always";
RestartSec = 30;
};
enable = true;
};
};
};
}