system: Only add phone groups when necessary

This commit is contained in:
Donovan Glover 2024-06-20 13:18:39 -04:00
parent 81cb06fc14
commit a9bebdc5f6
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -1,7 +1,7 @@
{ nix-config, pkgs, lib, config, ... }: { nix-config, pkgs, lib, config, ... }:
let let
inherit (lib) mkOption mkEnableOption mkIf singleton; inherit (lib) mkOption mkEnableOption mkIf singleton optionals;
inherit (lib.types) nullOr str listOf; inherit (lib.types) nullOr str listOf;
inherit (cfg) username iHaveLotsOfRam hashedPassword mullvad allowSRB2Port allowDevPort noRoot postgres phone; inherit (cfg) username iHaveLotsOfRam hashedPassword mullvad allowSRB2Port allowDevPort noRoot postgres phone;
inherit (builtins) attrValues; inherit (builtins) attrValues;
@ -135,12 +135,13 @@ in
if noRoot if noRoot
then [ ] then [ ]
else [ else [
"wheel"
"networkmanager"
] ++ (optionals (phone) [
"dialout" "dialout"
"feedbackd" "feedbackd"
"video" "video"
"wheel" ]);
"networkmanager"
];
}; };
}; };