nixos/opensnitch: link network_aliases.json to /etc/opensnitchd

Without this file present, the built in "LAN" and "MULTICAST" network options provided in the UI do not work.

Fixes: #445086
This commit is contained in:
Christian Flach
2026-05-30 10:56:36 +02:00
parent 4100e830e0
commit 1859b4a89b
2 changed files with 18 additions and 4 deletions

View File

@@ -207,6 +207,7 @@ in
};
tmpfiles.rules = [
"d ${cfg.settings.Rules.Path} 0750 root root - -"
"L+ /etc/opensnitchd/network_aliases.json - - - - ${cfg.package}/etc/opensnitchd/network_aliases.json"
"L+ /etc/opensnitchd/system-fw.json - - - - ${cfg.package}/etc/opensnitchd/system-fw.json"
];
};

View File

@@ -54,10 +54,23 @@ in
action = "allow";
duration = "always";
operator = {
type = "simple";
sensitive = false;
operand = "process.path";
data = "${pkgs.curl}/bin/curl";
type = "list";
operand = "list";
list = [
{
type = "simple";
sensitive = false;
operand = "process.path";
data = "${pkgs.curl}/bin/curl";
}
# Check that network aliases like "LAN" are properly resolved.
{
type = "network";
sensitive = false;
operand = "dest.network";
data = "LAN";
}
];
};
};
};