I’m trying to configure opensnitch, but having some issues with firefox-esr where ${lib.getBin pkgs.firefox-esr} returns a different nix store path than where my firefox-esr actually runs from.
lib.getBin works fine for other packages.
Any ideas?
opensnitch Config:
{
lib,
config,
pkgs,
...
}:
{
environment.systemPackages = with pkgs; [
opensnitch
opensnitch-ui
];
services.opensnitch = {
enable = true;
rules = {
systemd-timesyncd = {
name = "systemd-timesyncd";
enabled = true;
action = "allow";
duration = "always";
operator = {
type = "simple";
sensitive = false;
operand = "process.path";
data = "${lib.getBin pkgs.systemd}/lib/systemd/systemd-timesyncd";
};
};
nsncd = {
name = "nsncd";
enabled = true;
action = "allow";
duration = "always";
operator = {
type = "simple";
sensitive = false;
operand = "process.path";
data = "${lib.getBin pkgs.nsncd}/bin/nsncd";
};
};
firefox = {
name = "firefox-esr";
enabled = true;
action = "allow";
duration = "always";
operator = {
type = "list";
operand = "list";
list = [
{
type = "simple";
operand = "process.path";
data = "${lib.getBin pkgs.firefox-esr}/lib/firefox/firefox";
}
{
type = "regexp";
operand = "dest.port";
data = "^(53|80|443)$";
}
];
};
};
};
};
}