mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-08 01:14:01 +01:00
phone: Move phone-specific config out of system
This commit is contained in:
parent
2cd3aaf869
commit
86a786cf1f
@ -30,6 +30,10 @@ in
|
||||
xdg-user-dirs
|
||||
xresources
|
||||
;
|
||||
|
||||
config = {
|
||||
programs.man.generateCaches = lib.mkForce false;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = attrValues {
|
||||
@ -65,18 +69,10 @@ in
|
||||
system = {
|
||||
hostName = "mobile-nixos";
|
||||
stateVersion = "23.11";
|
||||
phone = true;
|
||||
};
|
||||
|
||||
desktop = {
|
||||
phone = true;
|
||||
mullvad = true;
|
||||
};
|
||||
|
||||
hardware.keyboardBinds = true;
|
||||
|
||||
system = {
|
||||
mullvad = true;
|
||||
};
|
||||
};
|
||||
|
||||
hardware.graphics.enable32Bit = lib.mkForce false;
|
||||
@ -100,6 +96,11 @@ in
|
||||
udisks2.enable = lib.mkForce false;
|
||||
};
|
||||
|
||||
boot.binfmt.emulatedSystems = lib.mkForce [ ];
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
networking.firewall.checkReversePath = lib.mkForce false;
|
||||
documentation.man.generateCaches = false;
|
||||
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
let
|
||||
inherit (lib) mkOption mkEnableOption mkIf singleton optionals;
|
||||
inherit (lib.types) nullOr str listOf;
|
||||
inherit (cfg) username iHaveLotsOfRam hashedPassword mullvad allowSRB2Port allowDevPort noRoot postgres phone;
|
||||
inherit (cfg) username iHaveLotsOfRam hashedPassword mullvad allowSRB2Port allowDevPort noRoot postgres;
|
||||
inherit (builtins) attrValues;
|
||||
|
||||
cfg = config.modules.system;
|
||||
@ -45,7 +45,6 @@ in
|
||||
};
|
||||
|
||||
iHaveLotsOfRam = mkEnableOption "tmpfs on /tmp";
|
||||
phone = mkEnableOption "Phone support";
|
||||
|
||||
hostName = mkOption {
|
||||
type = str;
|
||||
@ -62,7 +61,7 @@ in
|
||||
};
|
||||
|
||||
config = {
|
||||
boot = mkIf (!phone) {
|
||||
boot = {
|
||||
tmp =
|
||||
if iHaveLotsOfRam
|
||||
then { useTmpfs = true; }
|
||||
@ -138,16 +137,13 @@ in
|
||||
else [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
] ++ (optionals (phone) [
|
||||
"dialout"
|
||||
"feedbackd"
|
||||
"video"
|
||||
]);
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
documentation.man.generateCaches = mkIf (phone) false;
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
@ -157,7 +153,7 @@ in
|
||||
inherit (cfg) stateVersion;
|
||||
};
|
||||
|
||||
programs.man.generateCaches = mkIf (!phone) true;
|
||||
programs.man.generateCaches = true;
|
||||
};
|
||||
|
||||
users.${username}.home = {
|
||||
@ -233,8 +229,6 @@ in
|
||||
allowedTCPPorts = mkIf allowDevPort [
|
||||
3000
|
||||
];
|
||||
|
||||
checkReversePath = mkIf phone (lib.mkForce false);
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user