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