mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-08-18 10:39:46 +02:00
meta: Merge phone module with system / desktop
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
let
|
||||
inherit (lib) mkOption mkEnableOption mkIf singleton;
|
||||
inherit (lib.types) nullOr str listOf;
|
||||
inherit (cfg) username iHaveLotsOfRam hashedPassword mullvad allowSRB2Port allowDevPort noRoot postgres;
|
||||
inherit (cfg) username iHaveLotsOfRam hashedPassword mullvad allowSRB2Port allowDevPort noRoot postgres phone;
|
||||
inherit (builtins) attrValues;
|
||||
|
||||
cfg = config.modules.system;
|
||||
@@ -46,6 +46,8 @@ in
|
||||
|
||||
iHaveLotsOfRam = mkEnableOption "tmpfs on /tmp";
|
||||
|
||||
phone = mkEnableOption "PinePhone support";
|
||||
|
||||
hostName = mkOption {
|
||||
type = str;
|
||||
default = "nixos";
|
||||
@@ -123,7 +125,19 @@ in
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
password = mkIf (hashedPassword == null && !noRoot) username;
|
||||
extraGroups = if noRoot then [ ] else [ "wheel" "networkmanager" ];
|
||||
extraGroups =
|
||||
if noRoot
|
||||
then [ ]
|
||||
else
|
||||
if phone
|
||||
then [
|
||||
"dialout"
|
||||
"feedbackd"
|
||||
"networkmanager"
|
||||
"video"
|
||||
"wheel"
|
||||
]
|
||||
else [ "wheel" "networkmanager" ];
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user