{ config, pkgs, ... }: { programs.wireshark = { enable = true; package = pkgs.wireshark; }; # Add any users in the 'wheel' group to the 'wireshark' group. users.groups.wireshark.members = builtins.filter (x: builtins.elem "wheel" config.users.users."${x}".extraGroups) (builtins.attrNames config.users.users); }