sigboe / nixos-config

1 stars 0 forks source link

overlays for pkgs.unstable #1

Open EmergentMind opened 2 days ago

EmergentMind commented 2 days ago

Had a brief look at your config to see if I could figure out your issue with not being able to install packages using pkgs.unstable via the overlay.

The only thing that stands out to me is that where you are importing ./overlays to overlays in your flake.nix, you are only inheriting inputs where as I inherit both inputs and outputs.

Relevant line in yours: https://github.com/sigboe/nixos-config/blob/2dc8b4bddbb01c261fe504551c78982eee0c4954/flake.nix#L103

Relevant line in mine: https://github.com/EmergentMind/nix-config/blob/c5a4626cc74ee2b8c4a43553ac104bfbd06f1f92/flake.nix#L110

I'm not totally certain that is the problem but it's worth testing out.

Also, I couldn't find anything in your config where you may have been trying to use pkgs.unstable so not sure how you tried it but will throw the following out there just as an example in case the it helps. Keep in mind that I updated my flake a while ago to use unstable, and that my overlay sets up both pkgs.stable and pkgs.unstable, so I can pin something to either of them, regardless of what I do with pkgs itself.

I recently to pin the Calibre package to stable because of a build issue with one of its dependencies on unstable. https://github.com/EmergentMind/nix-config/blob/5ab6b860054847d04ff00229f00cad7af85edb71/home/ta/common/optional/media/default.nix#L12

Btw, haven't got to looking at the impermanence stuff you mentioned yet but will do when I get to that stage. Cheers.

sigboe commented 2 days ago

Thank you for having a look! That was unexpectedly nice of you! I do believe I had that line exactly like yours before, but was trying to copy your reference Misterio77 just to see if it changed that. I did just now try to add inherit outputs there as well now, but it didn't seam to fix the issue. Also I don't see where outputs are used, but it might be a nested thing?

Yes I don't have anywhere I am trying to use pkgs.unstable in my build, because, then it wouldn't allow me to sudo nixos-rebuild switch.

But the place I am trying to install an unstable package is here https://github.com/sigboe/nixos-config/blob/ef4da7d22b38cd55fcc2b6f8000b523572db61bb/home/sigurdb/common/core/nixvim/default.nix#L23

I am very glad you came back to me and followed up and said you had it working, because, then I know it is possible to fix in my config by changing something, and not making huge changes :) Thank you for that!