Expose the eachDefaultSystemPassThrough and eachSystemPassThrough
functions to handle cases where the system key should not be injected by
eachDefaultSystem and eachSystem:
inputs.flake-utils.lib.eachDefaultSystem (system: {
checks./*<SYSTEM>.*/"<CHECK>" = /* ... */;
devShells./*<SYSTEM>.*/"<DEV_SHELL>" = /* ... */;
packages./*<SYSTEM>.*/"<PACKAGE>" = /* ... */;
})
// inputs.flake-utils.lib.eachDefaultSystemPassThrough (system: {
homeConfigurations."<HOME_CONFIGURATION>" = /* ... */;
nixosConfigurations."<NIXOS_CONFIGURATION>" = /* ... */;
})
These functions prevent users from re-implementing simplified
eachDefaultSystem and eachSystem versions to avoid system key
injections, while benefiting from current and future complex logic, like
handling the '--impure' flag.
This addresses flake-utils' arguably biggest issue. [1]
[1]: https://ayats.org/blog/no-flake-utils
Meld allows you to break up a Nix Flake into parts while using the
same inputs across all of them. This is useful for splitting up large
flakes which are common in monorepos.
This PR is a back-compatible subset of #84.
By adding a new flake input here, it makes it possible to override the
list of systems using flake overrides.
See <https://github.com/nix-systems/nix-systems> for the full
explanation.