Resolve exported home configurations against their parent system config so hosted and bare-name homes keep the same Home Manager specialArgs on package and homeConfiguration export paths. This restores arbitrary home-manager.extraSpecialArgs keys instead of only hardcoded aliases and adds regression coverage for the export resolver.
Hosted homes were being exported through homeConfigurations and package activation outputs without rebinding osConfig and systemConfig to their parent system config. Resolve hosted homes against their matching system before exposing those outputs so user@host homes no longer evaluate with null specialArgs.
nix fmt collapsed a generated module wrapper to a plain args lambda, which broke modules expecting explicit pkgs injection during flake evaluation. Restore the named pkgs binding and keep formatter-driven rewrites from this run.
Snowfall mkLib/mkFlake imports all submodules with a shared argument set, so narrow lambdas crash when snowfall-config is present. Allow extra args and add an evaluation check to catch regressions during flake checks.
The project no longer relies on nixos-generators for virtual images, so
the badge is misleading.
fix(system): prefer special format handlers
Ensure formats like iso and docker use their module-backed builders even
when image variants exist.
The previous fix exposed `.activationPackage` but still nested them under
`packages.<system>.homeConfigurations`, which is an attrset, not a derivation.
`nix flake check` requires EVERY attribute under `packages.<system>` to be
a derivation. Now flattening home configurations directly into packages with
the prefix `homeConfigurations-<name>` 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`
`nix flake check` requires all `packages.<system>.*` to be derivations.
The previous implementation exposed full home-manager configurations (attrsets)
which caused validation to fail.
Now extracting `.activationPackage` from each home configuration to satisfy
the flake schema requirement.
Fixes CI failure introduced in 012761f.
Introduce get-entries-by-kind to eliminate duplication between get-directories
and get-files. Add filter-files helpers to reduce 6 similar filtering functions
into 2 reusable higher-order functions.
Changes:
- Added pipe to imports
- Added get-entries-by-kind using pipe for clearer data flow
- Refactored get-directories and get-files to use get-entries-by-kind
- Added filter-files and filter-files-recursive helpers
- Refactored all 6 file filtering functions to one-liners using helpers
Impact:
- Lines: +30 -49 (net: -19)
- Eliminated duplication in filesystem operations
- Introduced modern pipe pattern for data transformations
- Better composability with higher-order functions
Testing: nix flake check ✓
Use fp.compose for get-output-name and get-directory-name to leverage
existing composition utilities and adopt more idiomatic functional style.
Changes:
- path/default.nix: Convert to point-free using snowfall-lib.fp.compose
Impact: Improved code style, more functional approach
Testing: nix flake check ✓
Fix argument order for fold/foldr - the list element comes before the
accumulator in foldr, not after. This was causing evaluation errors
when using the library.
Add clear documentation for all uses of unsafeDiscardStringContext,
explaining that it's necessary when building flake outputs based on
file paths, as Nix doesn't allow using paths as attribute names directly.
Replace rec keyword with modern Nix patterns:
- Use explicit let...in bindings with inherit statements
- Use fix for recursive package bindings in package/default.nix
- This improves maintainability and follows idiomatic Nix patterns
Files modified:
- snowfall-lib/flake/default.nix
- snowfall-lib/fp/default.nix
- snowfall-lib/home/default.nix
- snowfall-lib/system/default.nix
- snowfall-lib/package/default.nix
Add merge-with-aliases function to attrs module and use it across checks,
modules, packages, shells, and templates to eliminate repeated alias merging
logic. Also optimize get-libs by replacing filter+map with a fold operation.