From e3464aa9cd74c042946549aaa6e886e6283ebbd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey=20=28they/them=29?= Date: Mon, 9 Mar 2026 21:25:43 -0700 Subject: [PATCH 1/2] feat(hosts): add lightweight option to replace hostname-based package checks Replace hardcoded hostname checks (zeta, spore) with a declarative lightweight option in host definitions. This allows hosts to opt-out of heavy packages (development tools, containers, javascript, graphite, jujutsu, file utilities, media tools) independently of their hostname, making the configuration more explicit and extensible. Co-Authored-By: Claude Haiku 4.5 --- flake.nix | 2 ++ home/default.nix | 4 ++-- lib/hosts.nix | 9 ++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index f631cee7..31c978ea 100644 --- a/flake.nix +++ b/flake.nix @@ -90,6 +90,7 @@ hostname = "zeta"; system = "aarch64-linux"; username = "mu"; + lightweight = true; }; glyph = mkNixosHost { hostname = "glyph"; @@ -100,6 +101,7 @@ hostname = "spore"; system = "x86_64-linux"; username = "mu"; + lightweight = true; }; }; diff --git a/home/default.nix b/home/default.nix index 9bd4d358..1130ed15 100644 --- a/home/default.nix +++ b/home/default.nix @@ -2,7 +2,7 @@ config, pkgs, lib, - hostname, + lightweight, ... }: { imports = [ @@ -26,7 +26,7 @@ }; } - (lib.mkIf (hostname != "spore" && hostname != "zeta") { + (lib.mkIf (!lightweight) { development = { ai.enable = true; containers.enable = true; diff --git a/lib/hosts.nix b/lib/hosts.nix index e14c0177..bbc4dce2 100644 --- a/lib/hosts.nix +++ b/lib/hosts.nix @@ -23,6 +23,7 @@ inputs @ { hostname, system, showBatteryStatus, + lightweight ? false, }: let pkgs-stable = import nixpkgs-stable {inherit system;}; hostHomePath = ./../hosts/${hostname}/home.nix; @@ -44,7 +45,7 @@ inputs @ { ++ nixpkgs.lib.optionals (hostHomeConfig != null) [hostHomeConfig]; }; home-manager.extraSpecialArgs = { - inherit hostname llm-profile pkgs-stable showBatteryStatus; + inherit hostname lightweight llm-profile pkgs-stable showBatteryStatus; }; }; @@ -52,6 +53,7 @@ inputs @ { hostname, system, username, + lightweight ? false, }: nixpkgs.lib.nixosSystem { inherit system; @@ -68,7 +70,7 @@ inputs @ { agenix.nixosModules.default home-manager.nixosModules.home-manager (mkHomeManager { - inherit username hostname system; + inherit username hostname system lightweight; showBatteryStatus = false; }) { @@ -82,6 +84,7 @@ inputs @ { mkDarwinHost = { hostname, username, + lightweight ? false, }: let system = "aarch64-darwin"; in @@ -99,7 +102,7 @@ inputs @ { ./../hosts/${hostname} home-manager.darwinModules.home-manager (mkHomeManager { - inherit username hostname system; + inherit username hostname system lightweight; showBatteryStatus = true; }) { From b7b5dc05a7c46751a6755dd4ec67fcae058d81c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey=20=28they/them=29?= Date: Mon, 9 Mar 2026 21:45:13 -0700 Subject: [PATCH 2/2] feat(home): enable AI packages on all hosts Move development.ai.enable out of the lightweight-gated block so lightweight hosts (zeta, spore) also get AI packages. Co-Authored-By: Claude Opus 4.6 --- home/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/default.nix b/home/default.nix index 1130ed15..e218ece7 100644 --- a/home/default.nix +++ b/home/default.nix @@ -16,6 +16,7 @@ rc = lib.mkMerge [ { + development.ai.enable = true; editor.enable = true; git.enable = true; ssh.enable = true; @@ -28,7 +29,6 @@ (lib.mkIf (!lightweight) { development = { - ai.enable = true; containers.enable = true; javascript.enable = true; };