Opensnitch: init at 1.0.0b and provide NixOS module #76897
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
Opensnitch seems to be a useful personal firewall application to control (at the moment only outgoing) connections per process/user/destination.
See also: #76610
Things done
The package provides two attributes, the daemon
opensnitchd
and the UI programopensnitch-ui
, which are built from the same source.Additionally, a NixOS module is provided which starts the daemon as a system service, and (default behavior) runs the UI process in each user's graphical session as a user service.
Some support is added for generating some predefined rules, as e.g. per-process rules, which have been created via the UI prompt, become obsolete if the store path to a program changes.
Issues:
Had some problems trying to put the socket file under
/run/...
, so it currently resides under the default/tmp
Permissions of log files, socket file and rules files could be wrong
Upstream uses version
1.0.0b
, but there seems to be no definitive release. Since upstream also advertises this as unstable, I added the commit date to the version numberTested using sandboxing (nix.useSandbox on NixOS, or option
sandbox
innix.conf
on non-NixOS linux)Built on platform(s)
Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
Tested compilation of all pkgs that depend on this change using
nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
Tested execution of all binary files (usually in
./result/bin/
)Determined the impact on package closure size (by running
nix path-info -S
before and after)Ensured that relevant documentation is up to date
Fits CONTRIBUTING.md.
NOTE: