-
Notifications
You must be signed in to change notification settings - Fork 2
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
Should nixpkgs/overlays.nix
contain an overlay referring to the pinned nixpkgs
?
#1
Comments
I'm not a fan of this because it's a bit recursive/backwards. The top level is the { pkgs, ... }: {
imports = [
(pkgs.nixpkgs + "/nixos/modules/...")
];
} This would fail because of how modules themselves can change Or what if you override |
Yes, I think I understand. I missed the recursive aspect of it! 😅 |
At least it can be "avoided" in the But really underneath To avoid that we need some standardised way to configure Nixpkgs, and yes, Flakes is one way to do that. |
Oh and regarding the hosts Lines 19 to 23 in 37b7f37
This is there so commands work by default. Flakes got "rid" of that by introducing the Flakes registry, which is just a glorified version of the same impure NIX_PATH, see also NixOS/nix#7422 |
As far as |
Indeed :) |
Okay! I think this is all clear to me, and I'm happy with the updated setup. Thank you! |
I (roughly) understand that the configuration's builder will know to look for the appropriate
nixpkgs
based on work done by therebuild
script to setNIX_PATH
appropriately.Therefore, there should not be the need to add the following to
nixpkgs/overlays.nix
:But I'm wondering if this is useful regardless? For example: if for some reason,
NIX_PATH
changes between whenrebuild
sets it, and the configuration is built, then the configuration will still end up using the rightnixpkgs
imported bynpins
/niv
/etc., rather than whatever is pointed to byNIX_PATH
?Also, I'm wondering if there is a way to obviate
NIX_PATH
entirely....will have to look into how it is read currently in thenixpkgs
repo, but it would be nice if we could point it to read from a file instead...Some way to fix the
NIX_PATH
env var, essentially, and make it "immutable".(One really silly/sad idea that comes to mind is a
systemd
unit that monitors changes toNIX_PATH
...)The text was updated successfully, but these errors were encountered: