nix-installer
nix-installer copied to clipboard
How to downgrade Nixpkgs to 23.05 on macOS?
Hi folks,
I've just used the new graphical installer for macOS from https://determinate.systems/posts/graphical-nix-installer, which seems to have gone successfully. However, after installing Home Manager with
nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager
nix-channel --update
nix-shell '<home-manager>' -A install
it now complains with
$ home-manager switch
trace: warning: You are using
Home Manager version 23.11 and
Nixpkgs version 24.05.
How could I downgrade Nixpkgs to the stable version (23.11) so that I don't have this version mismatch?
Thank you
@dinvlad Did you find any solution for this?
I believe you can edit your extra-nix-path in Nix.conf:
extra-nix-path = nixpkgs=flake:nixpkgs:2305
As a side note, I recommend you try using home-manager via flakes! https://nix-community.github.io/home-manager/index.xhtml#ch-nix-flakes
Generally at Detsys we try to avoid mixing nix-channels with flakes. It can create some frustrating problems.
@Hoverbear Modifying the extra-nix-path produce following error for nix-shell:
❯ nix-shell -p cowsay
error:
… <borked>
at «none»:0: (source not available)
… while calling the 'import' builtin
at «string»:1:18:
1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (cowsay) ]; } ""
| ^
(stack trace truncated; use '--show-trace' to show the full trace)
error: input 'nixpkgs:2305' is unsupported
However, switching to flakes installation works perfectly. Thanks for tip!