mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-22 18:51:22 +02:00
system: Add phone support
This commit is contained in:
parent
11e2304a7f
commit
16da2fd144
@ -3,7 +3,7 @@
|
|||||||
let
|
let
|
||||||
inherit (lib) mkOption mkEnableOption mkIf singleton;
|
inherit (lib) mkOption mkEnableOption mkIf singleton;
|
||||||
inherit (lib.types) nullOr str listOf;
|
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;
|
inherit (builtins) attrValues;
|
||||||
|
|
||||||
cfg = config.modules.system;
|
cfg = config.modules.system;
|
||||||
@ -45,6 +45,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
iHaveLotsOfRam = mkEnableOption "tmpfs on /tmp";
|
iHaveLotsOfRam = mkEnableOption "tmpfs on /tmp";
|
||||||
|
phone = mkEnableOption "Phone support";
|
||||||
|
|
||||||
hostName = mkOption {
|
hostName = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
@ -61,7 +62,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
boot = {
|
boot = mkIf (!phone) {
|
||||||
tmp =
|
tmp =
|
||||||
if iHaveLotsOfRam
|
if iHaveLotsOfRam
|
||||||
then { useTmpfs = true; }
|
then { useTmpfs = true; }
|
||||||
@ -85,7 +86,7 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd = {
|
systemd = mkIf (!phone) {
|
||||||
extraConfig = "DefaultTimeoutStopSec=10s";
|
extraConfig = "DefaultTimeoutStopSec=10s";
|
||||||
services.NetworkManager-wait-online.enable = false;
|
services.NetworkManager-wait-online.enable = false;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user