mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-20 17:57:47 +02: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";
|
hostName = "mobile-nixos";
|
||||||
stateVersion = "23.11";
|
stateVersion = "23.11";
|
||||||
mullvad = true;
|
mullvad = true;
|
||||||
phone = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.keyboardBinds = true;
|
hardware.keyboardBinds = true;
|
||||||
|
@ -25,10 +25,11 @@ let
|
|||||||
mullvad
|
mullvad
|
||||||
allowSRB2Port
|
allowSRB2Port
|
||||||
allowDevPort
|
allowDevPort
|
||||||
phone
|
|
||||||
postgres
|
postgres
|
||||||
;
|
;
|
||||||
|
|
||||||
|
isPhone = config.programs.calls.enable;
|
||||||
|
|
||||||
cfg = config.modules.system;
|
cfg = config.modules.system;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@ -80,7 +81,6 @@ in
|
|||||||
postgres = mkEnableOption "postgres database for containers";
|
postgres = mkEnableOption "postgres database for containers";
|
||||||
allowSRB2Port = mkEnableOption "port for srb2";
|
allowSRB2Port = mkEnableOption "port for srb2";
|
||||||
allowDevPort = mkEnableOption "port for development server";
|
allowDevPort = mkEnableOption "port for development server";
|
||||||
phone = mkEnableOption "phone support";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
@ -154,7 +154,7 @@ in
|
|||||||
|
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
uid = 1000;
|
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 =
|
extraGroups =
|
||||||
if isContainer then
|
if isContainer then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user