From 60401813e63e1ef854ab57676409746153724e61 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Thu, 10 Oct 2024 14:20:23 -0400 Subject: [PATCH] meta: prefer isPhone over mkForce --- hosts/phone/configuration.nix | 21 --------------------- modules/desktop.nix | 18 ++++++++++-------- modules/system.nix | 2 +- 3 files changed, 11 insertions(+), 30 deletions(-) diff --git a/hosts/phone/configuration.nix b/hosts/phone/configuration.nix index 394a89d4..26779eb6 100644 --- a/hosts/phone/configuration.nix +++ b/hosts/phone/configuration.nix @@ -47,25 +47,4 @@ in phone.enable = true; }; - - i18n.inputMethod.enable = mkForce false; - - programs = { - cdemu.enable = mkForce false; - hyprland.enable = mkForce false; - thunar.enable = mkForce false; - }; - - services = { - udisks2.enable = mkForce false; - pipewire.enable = mkForce false; - greetd.enable = mkForce false; - }; - - boot = { - binfmt.emulatedSystems = mkForce [ ]; - loader.systemd-boot.enable = mkIf (pkgs.system == "aarch64-linux") (mkForce false); - }; - - hardware.graphics.enable32Bit = mkForce false; } diff --git a/modules/desktop.nix b/modules/desktop.nix index e304ec23..1ff6737f 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -17,6 +17,8 @@ let inherit (cfg) bloat; + isPhone = config.programs.calls.enable; + cfg = config.modules.desktop; in { @@ -25,14 +27,14 @@ in }; config = { - hardware.graphics.enable32Bit = true; + hardware.graphics.enable32Bit = mkIf (!isPhone) true; programs = { - hyprland.enable = mkIf (!isContainer) true; - cdemu.enable = true; + hyprland.enable = mkIf (!isContainer && !isPhone) true; + cdemu.enable = mkIf (!isPhone) true; thunar = { - enable = true; + enable = mkIf (!isPhone) true; plugins = with pkgs.xfce; [ thunar-volman @@ -40,7 +42,7 @@ in }; }; - i18n.inputMethod = { + i18n.inputMethod = mkIf (!isPhone) { enable = true; type = "fcitx5"; @@ -54,7 +56,7 @@ in }; services = { - udisks2 = { + udisks2 = mkIf (!isPhone) { enable = true; mountOnMedia = true; }; @@ -78,7 +80,7 @@ in displayManager.startx.enable = true; }; - pipewire = { + pipewire = mkIf (!isPhone) { enable = true; alsa = { @@ -89,7 +91,7 @@ in pulse.enable = true; }; - greetd = mkIf (!isContainer) { + greetd = mkIf (!isContainer && !isPhone) { enable = true; restart = false; diff --git a/modules/system.nix b/modules/system.nix index df347591..076cf67c 100644 --- a/modules/system.nix +++ b/modules/system.nix @@ -90,7 +90,7 @@ in binfmt.emulatedSystems = [ "aarch64-linux" ]; loader = { - systemd-boot = { + systemd-boot = mkIf (!isPhone) { enable = true; editor = false; configurationLimit = 10;