diff --git a/hosts/del/configuration.nix b/hosts/del/configuration.nix index 3bdd57c1..8d89e609 100644 --- a/hosts/del/configuration.nix +++ b/hosts/del/configuration.nix @@ -1,7 +1,6 @@ { config, pkgs, - lib, inputs, ... }: { @@ -57,7 +56,7 @@ security.polkit.enable = true; users.users.${config.myOptions.other.system.username} = { - extraGroups = [ "networkmanager" "libvirtd" "video" ]; + extraGroups = [ "libvirtd" "video" ]; }; environment.sessionVariables = { diff --git a/hosts/niks/configuration.nix b/hosts/niks/configuration.nix index 9bc801ae..7fabcb89 100644 --- a/hosts/niks/configuration.nix +++ b/hosts/niks/configuration.nix @@ -1,7 +1,6 @@ { config, pkgs, - lib, inputs, ... }: { @@ -78,7 +77,7 @@ security.polkit.enable = true; users.users.${config.myOptions.other.system.username} = { - extraGroups = [ "networkmanager" "libvirtd" ]; + extraGroups = [ "libvirtd" ]; }; environment.sessionVariables = { diff --git a/options/common/networking.nix b/options/common/networking.nix index 8f971374..94dd312a 100644 --- a/options/common/networking.nix +++ b/options/common/networking.nix @@ -1,7 +1,9 @@ { lib, ... -}: { +}: let + username = config.myOptions.other.system.username; +in { networking = { networkmanager = { enable = true; @@ -24,4 +26,6 @@ targets.network-online.wantedBy = lib.mkForce []; # default is [ "multi-user.target" ] services.NetworkManager-wait-online.wantedBy = lib.mkForce []; # default is [ "network-online.target" ] }; + + users.users.${username}.extraGroups = [ "networkmanager" ]; }