System: Add networkmanager modify system polkit permission
This commit is contained in:
@ -66,7 +66,7 @@ in {
|
|||||||
mkIf (!cfg.useNetworkManager) {text = names;};
|
mkIf (!cfg.useNetworkManager) {text = names;};
|
||||||
|
|
||||||
# Allow to enable/disable tunnels without root password
|
# Allow to enable/disable tunnels without root password
|
||||||
modules.polkit.allowed-system-services = let
|
modules.polkit.allowedSystemServices = let
|
||||||
vpn-services = lib.pipe cfg.wireguard-tunnels [
|
vpn-services = lib.pipe cfg.wireguard-tunnels [
|
||||||
attrNames
|
attrNames
|
||||||
(map (v: "${v}.service"))
|
(map (v: "${v}.service"))
|
||||||
@ -74,6 +74,11 @@ in {
|
|||||||
in
|
in
|
||||||
mkIf (!cfg.useNetworkManager) vpn-services;
|
mkIf (!cfg.useNetworkManager) vpn-services;
|
||||||
|
|
||||||
|
modules.polkit.allowedActions = mkIf cfg.useNetworkManager [
|
||||||
|
# NOTE: List permissions by running "nmcli general permissions"
|
||||||
|
"org.freedesktop.NetworkManager.settings.modify.system"
|
||||||
|
];
|
||||||
|
|
||||||
# General Networking Settings
|
# General Networking Settings
|
||||||
networking = {
|
networking = {
|
||||||
# Gets inherited from flake in nixos mylib and passed through the module option
|
# Gets inherited from flake in nixos mylib and passed through the module option
|
||||||
|
Reference in New Issue
Block a user