sinead
December 2, 2023, 7:31am
1
Hello,
I’m using flakes and I’d like to use the new stable channel 23.11 but for some packages, I’d like to use the latest versions (unstable). I always get an error when trying to rebuild.
I’m able to set nixpkgs-unstable.url and then I have
outputs = { self, nixpkgs, nixpkgs-unstable, ... }@attrs: {
nixosConfigurations.fnord = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = attrs;
modules = [ ./configuration.nix ];
};
};
How in my configuration.nix
can I use nixpkgs-unstable?
I’d like to be able to do something like
systemPackages = with pkgs; [
unstable.rustc
git
# ...
Thank you!
1 Like
pkulak
December 2, 2023, 7:47am
2
I’m probably the last person who should be answering, cus I barely know what I’m doing, but I did manage to get that working recently with an overlay:
https://git.sr.ht/~pkulak/nix/tree/main/item/configuration.nix#L57
1 Like
Damage
December 2, 2023, 11:44am
3
Another example using flakes is here (found via the ZFS Root for Nixos pages):
https://github.com/ne9z/dotfiles-flake.git
1 Like
arthur
December 2, 2023, 12:28pm
4
I also use an overlay called “unstable” like this:
(final: prev: {
unstable = import nixpkgs-unstable {
system = prev.system;
};
})
when installing packages it’s then possible to use pkgs.unstable.rustc
like in your example.
6 Likes