Skip to content

Commit

Permalink
Re-enable opensnitch
Browse files Browse the repository at this point in the history
  • Loading branch information
stusmall committed May 23, 2024
1 parent 386cd5d commit b4a1338
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# Set a limit on the number of generations to include in boot
boot.loader.systemd-boot.configurationLimit = 20;

# clean tmp directory on boot. Otherwise this fills up overtime and causes issues
boot.tmp.cleanOnBoot = true;


Expand Down Expand Up @@ -93,6 +94,9 @@
operation = "boot";
};

# Enable udev settings for yubikey personalization
services.udev.packages = [ pkgs.yubikey-personalization ];


environment.systemPackages = with pkgs; [
helix
Expand Down
3 changes: 2 additions & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ done

echo "Setting up channels"
sudo nix-channel --add https://nixos.org/channels/nixos-23.11 nixos
sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos-unstable
sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager
sudo nix-channel --update

echo "Rebuilding the OS"
sudo nixos-rebuild boot

echo "All done!"
echo "All done! Reboot to use updated config"
2 changes: 1 addition & 1 deletion modules/opensnitch.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# A list of general rules needed no matter how the system is configured
services.opensnitch = {
enable = false;
enable = true;
settings.DefaultAction = "deny";
rules = {
rule-000-firefox = {
Expand Down
5 changes: 3 additions & 2 deletions modules/rust.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@
operand = "list";
list = [
{
type = "regex";
type = "regexp";
sensitive = false;
operand = "process.path";
data = "^/home/stusmall/.rustup/toolchains/*/bin/cargo$";
data = "^/home/stusmall/.rustup/toolchains/(.*)/bin/cargo$";
}
{
type = "regexp";
operand = "dest.host";
sensitive = false;
data = "^(([a-z0-9|-]+\.)*crates\.io)$";
operand = "process.path";
}
];
};
Expand Down

0 comments on commit b4a1338

Please sign in to comment.