From 1e41848ba9a198bd3cf9fda4603894e23d1da9a2 Mon Sep 17 00:00:00 2001 From: anntnzrb Date: Thu, 9 Oct 2025 00:34:37 -0500 Subject: [PATCH] fix: flatten home configs into packages to satisfy flake schema The previous fix exposed `.activationPackage` but still nested them under `packages..homeConfigurations`, which is an attrset, not a derivation. `nix flake check` requires EVERY attribute under `packages.` to be a derivation. Now flattening home configurations directly into packages with the prefix `homeConfigurations-` to ensure each is a top-level derivation. Changes: - Merge pipe result directly with `//` instead of nesting under `homeConfigurations` - Prefix each home config with "homeConfigurations-" to avoid naming conflicts Result: `packages.x86_64-linux.homeConfigurations-user` instead of `packages.x86_64-linux.homeConfigurations.user` --- snowfall-lib/flake/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/snowfall-lib/flake/default.nix b/snowfall-lib/flake/default.nix index f0af68c..973fb75 100644 --- a/snowfall-lib/flake/default.nix +++ b/snowfall-lib/flake/default.nix @@ -223,16 +223,19 @@ let // (builtins.listToAttrs ( builtins.map (system: { name = system; - value = flake-outputs.packages.${system} // { - homeConfigurations = pipe homes [ + value = + flake-outputs.packages.${system} + // (pipe homes [ (filterAttrs (_: home: home.system == system)) (mapAttrs (home-name: _: flake-outputs.homeConfigurations.${home-name}.activationPackage)) (mapAttrs' ( name: value: - nameValuePair (if hasSuffix "@${system}" name then removeSuffix "@${system}" name else name) value + nameValuePair ( + "homeConfigurations-" + + (if hasSuffix "@${system}" name then removeSuffix "@${system}" name else name) + ) value )) - ]; - }; + ]); }) (builtins.attrNames flake-outputs.pkgs) )); };