mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-01-26 15:48:36 +01:00
system: Only add phone groups when necessary
This commit is contained in:
parent
81cb06fc14
commit
a9bebdc5f6
@ -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"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user