Fix bug for non-home-manager machine
This commit is contained in:
parent
a5dee47f5b
commit
75f0cb6112
|
@ -1,9 +1,4 @@
|
||||||
{
|
{ config, machineProps, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
machineProps,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
anyWiresharkUser =
|
anyWiresharkUser =
|
||||||
if machineProps.enableHomeManager then
|
if machineProps.enableHomeManager then
|
||||||
|
@ -15,11 +10,19 @@ let
|
||||||
userUseWireshark = value: value.my.development.tools.networking.enable;
|
userUseWireshark = value: value.my.development.tools.networking.enable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = {
|
config =
|
||||||
programs.wireshark.enable = anyWiresharkUser;
|
{
|
||||||
|
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
|
||||||
|
{ }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue