From 81f9c0dc3e07f5844194da8e7f18830e183b93bc Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Thu, 29 Feb 2024 01:04:51 +0100 Subject: [PATCH] add the user to the networkmanager group in the option-module still IDK how else to call these might change the name later --- hosts/del/configuration.nix | 3 +-- hosts/niks/configuration.nix | 3 +-- options/common/networking.nix | 6 +++++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/hosts/del/configuration.nix b/hosts/del/configuration.nix index 3bdd57c..8d89e60 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 9bc801a..7fabcb8 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 8f97137..94dd312 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" ]; }