diff --git a/modules/workstation/wireshark.nix b/modules/workstation/wireshark.nix index 5c257fd..1f25dee 100644 --- a/modules/workstation/wireshark.nix +++ b/modules/workstation/wireshark.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - machineProps, - ... -}: +{ config, machineProps, ... }: let anyWiresharkUser = if machineProps.enableHomeManager then @@ -15,11 +10,19 @@ let userUseWireshark = value: value.my.development.tools.networking.enable; in { - config = { - programs.wireshark.enable = anyWiresharkUser; + config = + { + programs.wireshark.enable = anyWiresharkUser; - users.users = builtins.mapAttrs (name: value: { - extraGroups = if (userUseWireshark value) then [ "wireshark" ] else [ ]; - }) config.home-manager.users; - }; + } + // ( + if machineProps.enableHomeManager then + { + users.users = builtins.mapAttrs (name: value: { + extraGroups = if (userUseWireshark value) then [ "wireshark" ] else [ ]; + }) config.home-manager.users; + } + else + { } + ); }