Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update flake outputs structure in line with current specification #126

Closed
wants to merge 2 commits into from

Conversation

montchr
Copy link
Contributor

@montchr montchr commented Oct 15, 2022

The current flake.nix has a lot of system-scoping boilerplate repetition which is oftentimes reduced in flakes by way of the flake-utils library or, lately, the flake-parts library. It is also certainly possible to do so using nixpkgs.lib but the third-party libraries can provide some additional stability if the flakes output API changes again.

A related issue is that the current flake outputs are lagging behind the current flakes specification, which results in an unintuitive usage by flake consumers, as well as a bunch of deprecation warnings.

This pull request would introduce the renaming of the following outputs as follows:

  • nixosModule -> nixosModules.default
  • overlay -> overlays.default
  • defaultPackage.<system> -> packages.<system>.default

As a result, this will be a breaking change. But that's the nature of using an experimental feature, and the deprecation has been clear for a while.

BREAKING CHANGE: this commit removes several flake outputs which have
been marked as deprecated upstream for quite a while:

- `nixosModule` -> `nixosModules.default`
- `overlay` -> `overlays.default`
- `defaultPackage.<system>` -> `packages.<system>.default`
@montchr
Copy link
Contributor Author

montchr commented Oct 15, 2022

#127 should be merged before this, since the deprecation warnings are not exposed on 21.11

};
flake.overlays.default = final: prev: {
agenix = prev.callPackage ./pkgs/agenix.nix {};
};
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not want to use complex constructions and external libraries to save 10 lines of boilerplate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants