1
0

profiles/desktop: Give desktop users special permisions for networkmanager

This commit is contained in:
2025-12-14 13:13:54 +01:00
parent f152e1c60d
commit 9b3d9993f4
3 changed files with 17 additions and 2 deletions

View File

@@ -13,6 +13,10 @@
];
profiles.clerie.desktop.enable = true;
profiles.clerie.desktop.users = [
"clerie"
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;

View File

@@ -6,6 +6,11 @@ with lib;
options.profiles.clerie.desktop = {
enable = mkEnableOption "clerie Desktop Config";
users = mkOption {
type = with types; listOf str;
default = [];
description = "Names of users that are considered desktop users and therefore get special permissions";
};
};
imports = [

View File

@@ -2,9 +2,13 @@
with lib;
{
let
config = mkIf config.profiles.clerie.desktop.enable {
cfg = config.profiles.clerie.desktop;
in {
config = mkIf cfg.enable {
networking.networkmanager.settings = {
connectivity = {
@@ -15,6 +19,8 @@ with lib;
};
};
users.groups.networkmanager.members = cfg.users;
};
}