From 23a19015afd5a4f70528fed7dc4132485bd94f14 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Thu, 4 Dec 2025 10:30:43 +0100 Subject: [PATCH] [wireshark] Add module --- nixos/hosts/Tibo-NixTop/default.nix | 1 + nixos/modules/programs/default.nix | 1 + nixos/modules/programs/wireshark/default.nix | 23 ++++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 nixos/modules/programs/wireshark/default.nix diff --git a/nixos/hosts/Tibo-NixTop/default.nix b/nixos/hosts/Tibo-NixTop/default.nix index bce3067..7d977af 100644 --- a/nixos/hosts/Tibo-NixTop/default.nix +++ b/nixos/hosts/Tibo-NixTop/default.nix @@ -38,6 +38,7 @@ home-manager.enable = true; sops.enable = true; ssh.enable = true; + wireshark.enable = true; }; services = { diff --git a/nixos/modules/programs/default.nix b/nixos/modules/programs/default.nix index fd61ea8..5f672a8 100644 --- a/nixos/modules/programs/default.nix +++ b/nixos/modules/programs/default.nix @@ -5,5 +5,6 @@ ./sops ./spotify-adblock ./ssh + ./wireshark ]; } diff --git a/nixos/modules/programs/wireshark/default.nix b/nixos/modules/programs/wireshark/default.nix new file mode 100644 index 0000000..04945fe --- /dev/null +++ b/nixos/modules/programs/wireshark/default.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.sisyphus.programs.wireshark; +in { + options.sisyphus.programs.wireshark.enable = lib.mkEnableOption "Wireshark"; + + config = lib.mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + wireshark + ]; + + programs.wireshark = { + enable = true; + dumpcap.enable = true; + usbmon.enable = false; + }; + + sisyphus.users.wantedGroups = [ + "wireshark" + ]; + }; +}