9 cfg = config.programs.tcpdump;
14 enable = lib.mkOption {
15 type = lib.types.bool;
18 Whether to configure a setcap wrapper for tcpdump.
19 To use it, add your user to the `pcap` group.
25 config = lib.mkIf cfg.enable {
26 security.wrappers.tcpdump = {
29 capabilities = "cap_net_raw+p";
30 permissions = "u+rx,g+x";
31 source = lib.getExe pkgs.tcpdump;
34 users.groups.pcap = { };