From a9bebdc5f652b73f95bb08296bc647c02439ab54 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Thu, 20 Jun 2024 13:18:39 -0400 Subject: [PATCH] system: Only add phone groups when necessary --- modules/system.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/system.nix b/modules/system.nix index 8a25a045..0372b188 100644 --- a/modules/system.nix +++ b/modules/system.nix @@ -1,7 +1,7 @@ { nix-config, pkgs, lib, config, ... }: let - inherit (lib) mkOption mkEnableOption mkIf singleton; + inherit (lib) mkOption mkEnableOption mkIf singleton optionals; inherit (lib.types) nullOr str listOf; inherit (cfg) username iHaveLotsOfRam hashedPassword mullvad allowSRB2Port allowDevPort noRoot postgres phone; inherit (builtins) attrValues; @@ -135,12 +135,13 @@ in if noRoot then [ ] else [ + "wheel" + "networkmanager" + ] ++ (optionals (phone) [ "dialout" "feedbackd" "video" - "wheel" - "networkmanager" - ]; + ]); }; };