Hi,
I am using stable (23.05) for my system but since I have some problems with a Gnome Extension, I want to use the unstable version for this specific package. I already looked into overwrites and overlays, even looked at configs from other people that seem do the same thing. But still I am absolutely helpless and have no idea how to adapt it to my Flake config…
I have already added nixpkgs-unstable to the inputs/outputs of the flake, but I don’t know how to pass it to home-manager and there install a package from unstable instead of stable.
May anyone be so kind to help me out?
Idk… I find flakes so utterly complicated… I just dont unserstand it…
If you have any good learning resources, feel free to share.
Note that I use home-manager separately from NixOS configuration.
You have home-manager as a NixOS module, but it should be easy to adapt to that approach.
btw, I don’t have a deep understanding of how this all works, either
The starter config works almost too well - there’s not much opportunity to learn when everything works.
Hi! nixpkgs.lib.nixosSystem does not know anything about the nixpkgs-unstable flake, which you are also loading. Similar to @ttrei, I also
suggest providing the unstable packages as an overlay like so:
Then, you can use this overlay in one of your NixOs modules (e.g., the mentioned ./system/main.nix module):
nixpkgs.overlays = [add-unstable-packages];
And finally, you can install unstable packages with
environment.systemPackages = [ unstable.hello ];
EDIT: And yea, the initial setup is complicated. But when it’s done; yeah, you can install and run different package versions (and their software stacks) next to each other. Awesome.
In the outputs? Or in the inputs? Or as a separate block?
@ttrei you defined it in a separate file, which currently isn’t necessary for me because this will be my only overlay for now.
btw. I already came across the templates from Misterio77, but the default one is too complicated for now. Since I don’t understand all that’s going on there, I avoided using it for now. Should I just use it and go from there?
I highly recommend going with the template.
Yes, it might be inscrutable in the beginning, but so is nix and NixOS
I find it much easier to learn by modifying/breaking existing config than by creating from scratch.
Thanks! I will now start to migrate everything I’ve done so far into the Misterio77 normal template. I guess it makes sense to start with a pre-organized config, instead of cooking my own soup.