mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 00:03:55 +01:00
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:
parent
21cd3e96da
commit
5790f1bbde
@ -63,7 +63,6 @@ in
|
||||
hostName = "mobile-nixos";
|
||||
stateVersion = "23.11";
|
||||
mullvad = true;
|
||||
phone = true;
|
||||
};
|
||||
|
||||
hardware.keyboardBinds = true;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user