Skip to content

nix: make usage in non-flake setups easier #296

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

Open
wants to merge 3 commits into
base: hovudstraum
Choose a base branch
from

Conversation

Sorixelle
Copy link

using the nix expressions in setups where flakes aren't in use was possible, but a little unwieldy (you had to reconstruct the overlay defined in the flake to get copyparty in your nixpkgs set). this pr moves the overlay into it's own dedicated file, allowing it to be used directly without requiring something like flake-compat. there's also some extra documentation, illustrating how to use the module in a non-flake nixos setup.

i've also added a commit that removes a (seemingly) unnecessary evaluation of nixpkgs, to avoid contributing to the "1000 instances of nixpkgs" issue. this one might be a little controversial, so i've added it as a suggestion - if you're not interested in this change, i'll happily drop the commit. it's not super necessary for anything, just a potential optimisation i spotted.

this pr complies with the dco; https://developercertificate.org/

@chinponya
Copy link
Contributor

LGTM. I don't see a reason why it should be dropped.

It might just conflict a little with #253 depending on which one gets merged first.

@Sorixelle
Copy link
Author

the main issue with that appliedOverlay trick is that it doesn't work when the overlay expects final to be the actual final nixpkgs set (ie. it uses final to reference things the overlay itself defines, or things from other required overlays). that's not happening here though, so i figured it would be fine, but if the overlay does get a little more complex and relies on final actually being what it should, you'd probably have to drop that trick and just eat the extra instantiation.

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