diff options
author | figsoda <figsoda@pm.me> | 2023-05-09 15:48:56 -0400 |
---|---|---|
committer | figsoda <figsoda@pm.me> | 2023-05-09 15:53:34 -0400 |
commit | 282e5e03a859f96fb6288653d92e070a3a2e173d (patch) | |
tree | cac78acdd6f07c34f24b6d4919206ae04232a3f8 /nixos/modules | |
parent | 5d74e13d2c1b0c92e791c8f2f07f58d854a4bd31 (diff) |
nixos/sniffnet: init
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/programs/sniffnet.nix | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 4941b78a5772f..b6679b348e395 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -235,6 +235,7 @@ ./programs/singularity.nix ./programs/skim.nix ./programs/slock.nix + ./programs/sniffnet.nix ./programs/spacefm.nix ./programs/ssh.nix ./programs/starship.nix diff --git a/nixos/modules/programs/sniffnet.nix b/nixos/modules/programs/sniffnet.nix new file mode 100644 index 0000000000000..98e9f628a9bce --- /dev/null +++ b/nixos/modules/programs/sniffnet.nix @@ -0,0 +1,24 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.programs.sniffnet; +in + +{ + options = { + programs.sniffnet = { + enable = lib.mkEnableOption (lib.mdDoc "sniffnet"); + }; + }; + + config = lib.mkIf cfg.enable { + security.wrappers.sniffnet = { + owner = "root"; + group = "root"; + capabilities = "cap_net_raw,cap_net_admin=eip"; + source = "${pkgs.sniffnet}/bin/sniffnet"; + }; + }; + + meta.maintainers = with lib.maintainers; [ figsoda ]; +} |