mirror of
https://github.com/davegallant/nix-config
synced 2025-08-07 21:32:27 +00:00
Add opensnitch to Linux
This commit is contained in:
24
common/opensnitch/default.nix
Normal file
24
common/opensnitch/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Reference in New Issue
Block a user