system: Determine isPhone from programs.calls.enable

Removes the redundant phone option and enables the usage of isPhone in
other modules besides system without having to import it.
This commit is contained in:
Donovan Glover 2024-09-09 11:51:39 -04:00
parent 21cd3e96da
commit 5790f1bbde
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 3 additions and 4 deletions

View File

@ -63,7 +63,6 @@ in
hostName = "mobile-nixos";
stateVersion = "23.11";
mullvad = true;
phone = true;
};
hardware.keyboardBinds = true;

View File

@ -25,10 +25,11 @@ let
mullvad
allowSRB2Port
allowDevPort
phone
postgres
;
isPhone = config.programs.calls.enable;
cfg = config.modules.system;
in
{
@ -80,7 +81,6 @@ in
postgres = mkEnableOption "postgres database for containers";
allowSRB2Port = mkEnableOption "port for srb2";
allowDevPort = mkEnableOption "port for development server";
phone = mkEnableOption "phone support";
};
config = {
@ -154,7 +154,7 @@ in
isNormalUser = true;
uid = 1000;
password = mkIf (hashedPassword == null && !isContainer) (if phone then "1234" else username);
password = mkIf (hashedPassword == null && !isContainer) (if isPhone then "1234" else username);
extraGroups =
if isContainer then