add the user to the networkmanager group in the option-module

still IDK how else to call these might change the name later
This commit is contained in:
jacekpoz 2024-02-29 01:04:51 +01:00
parent f545992742
commit 81f9c0dc3e
No known key found for this signature in database
GPG key ID: 94E812A8B12AAE3C
3 changed files with 7 additions and 5 deletions

View file

@ -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 = {

View file

@ -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 = {

View file

@ -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" ];
}