1 { config, lib, pkgs, ... }:
6 cfg = config.programs.wireshark;
7 wireshark = cfg.package;
10 programs.wireshark = {
14 description = lib.mdDoc ''
15 Whether to add Wireshark to the global environment and configure a
16 setcap wrapper for 'dumpcap' for users in the 'wireshark' group.
21 default = pkgs.wireshark-cli;
22 defaultText = literalExpression "pkgs.wireshark-cli";
23 description = lib.mdDoc ''
24 Which Wireshark package to install in the global environment.
30 config = mkIf cfg.enable {
31 environment.systemPackages = [ wireshark ];
32 users.groups.wireshark = {};
34 security.wrappers.dumpcap = {
35 source = "${wireshark}/bin/dumpcap";
36 capabilities = "cap_net_raw+p";
39 permissions = "u+rx,g+x";