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

while useGlobalPkgs=true, nixpkgs.config can be set without error message if nixpkgs.overlays is null (and vice versa) #6079

Open
justDeeevin opened this issue Nov 13, 2024 · 3 comments · May be fixed by #6172
Assignees

Comments

@justDeeevin
Copy link

Description

When home-manager.useGlobalPkgs = true, setting nixpkgs.overlays in the home configuration has no effect. I unknowingly had useGlobalPkgs enabled in my config and struggled for days with overlays not applying. There should be a warning emitted if a user tries to add an overlay to nixpkgs in their home configuration while useGlobalPkgs is enabled, informing them of this relationship.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/setting-nixpkgs-overlays-in-home-manager-config-does-nothing/55928/5

@justDeeevin
Copy link
Author

justDeeevin commented Dec 4, 2024

I decided to work on a pull request for this and found an assertion that should handle this exact case... unsure why it didn't apply when i was having this problem

@justDeeevin
Copy link
Author

justDeeevin commented Dec 4, 2024

A-ha! The assertion uses an OR where it should use an AND! I can set nixpkgs.overlays without the failing so long as nixpkgs.config is empty, and vice versa!

>:(

@justDeeevin justDeeevin changed the title Emit a warning when attempting to set nixpkgs.overlays while home-manager.useGlobalPkgs = true while useGlobalPkgs=true, nixpkgs.config can be set without error message if nixpkgs.overlays is null (and vice versa) Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants