Fix bug for non-home-manager machine
This commit is contained in:
parent
a5dee47f5b
commit
75f0cb6112
|
@ -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 = {
|
||||
config =
|
||||
{
|
||||
programs.wireshark.enable = anyWiresharkUser;
|
||||
|
||||
}
|
||||
// (
|
||||
if machineProps.enableHomeManager then
|
||||
{
|
||||
users.users = builtins.mapAttrs (name: value: {
|
||||
extraGroups = if (userUseWireshark value) then [ "wireshark" ] else [ ];
|
||||
}) config.home-manager.users;
|
||||
};
|
||||
}
|
||||
else
|
||||
{ }
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue