From efb91d4905133f241ef2a23d2c1f757f3ae1aed7 Mon Sep 17 00:00:00 2001 From: Quinn Unger Date: Tue, 8 Sep 2026 14:53:15 +0100 Subject: [PATCH] make host-specific home config optional --- flake.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index ee8243c..67ade3a 100644 --- a/flake.nix +++ b/flake.nix @@ -57,6 +57,8 @@ otherHosts = lib.mapAttrsToList (n: v: { inherit (self.nixosConfigurations.${n}) config; }) otherHostNames; + homeCfg = ./hosts/${host}/home; + systemCfg = ./hosts/${host}/os; in { specialArgs = { inherit inputs otherHosts; }; @@ -70,7 +72,7 @@ inputs.sops-nix.nixosModules.default ./common ./nixosModules - (inputs.import-tree ./hosts/${host}/os) + (inputs.import-tree systemCfg) { home-manager.sharedModules = [ ./homeModules @@ -111,7 +113,7 @@ } ]; users.${config.sidonia.userName} = { - imports = [ (inputs.import-tree ./hosts/${host}/home) ]; + imports = lib.optional (lib.pathExists homeCfg) (inputs.import-tree homeCfg); home = { username = config.sidonia.userName; homeDirectory = "/home/${config.sidonia.userName}"; -- 2.51.2