mirror of
https://github.com/davegallant/nix-config
synced 2025-08-06 11:23:40 +00:00
25 lines
669 B
Nix
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;
|
|
};
|
|
};
|
|
};
|
|
|
|
}
|