aboutsummaryrefslogtreecommitdiff
path: root/modules/profiles/wireshark/default.nix
blob: 31a58cb7e81cedbc59e94cc5ab692d0469d47d06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# modules/profiles/wireshark/default.nix
#
# For the occasional packet sniffing and network troubleshooting.

{
  config,
  pkgs,
  ...
}:
{
  programs.wireshark = {
    enable = true;
    package = pkgs.wireshark;
  };

  # Add any users in the 'wheel' group to the 'wireshark' group.
  users.groups.wireshark.members =
    with builtins;
    let
      users = config.users.users;
    in
    filter (u: elem "wheel" users.${u}.extraGroups) (attrNames users);
}