feat(class): Classes for flake exposed system outputs#346
Merged
Conversation
814b812 to
4317b90
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changeset Summary
Moved forward into nix/lib
forwardproved to be a core combinator, moving it to lib allows to be used outside of Den's NixOS framework.Forward based Ouputs
Now all
nixosConfigurations,homeConfigurations,etc are now generated viaforwarditself, accumulating into aflake-class moduleFlake System Outputs
Den now supports exposing to flake outputs via aspects.
The following classes were added (each named after the corresponding flake output attribute):
packages,apps,checks,legacyPackages,devShells. All these are per-system outputs.Usage:
See
templates/ci/modules/features/forward-flake-level.nixfor all testsYou can also make all your hosts produce flake-level outputs by simply
creating a context transition
{ system }->{ host }:flakeOutputs.*modules. See #317Den now provides the following modules under
inputs.den.flakeOutputs.*flake: creates a genericoptions.flaketop-level option. Used only when noinputs.flake-partsis available to avoid collision with flake-parts.nixosConfigurations: createsoptions.flake.nixosConfigurationsdarwinConfigurationshomeConfigurationspackages: creates per-systemoptions.flake.packagesappschecksdevShellslegacyPackagesYou will only need to import these on your flake (like we did in the previous code example) if you want to enable those flake outputs being written by Den.
den.systemsoptionThis option is used by
den.ctx.systemto know what systems to produce outputs for.It default to
config.systems(flake-parts top-level system if it exists), or systems ofden.hosts+den.hosmes, or if those were empty:lib.systems.flakeExposednvf-standalone using packages output
Our nvf example was the first iteration on producing packages from Den aspects, it has been updated to use
den.ctx.flake-packagesnow.