Downgrade Nix from 25 to 24.11 - kdaisho/Blog GitHub Wiki
Every time I ran home-manager switch
I see warnings as home-manager version and nixPkgs version are unmatch.
warning: You are using
Home Manager version 24.11 and
Nixpkgs version 25.05.
Using mismatched versions is likely to cause errors and unexpected
behavior. It is therefore highly recommended to use a release of Home
Manager that corresponds with your chosen release of Nixpkgs.
If you insist then you can disable this warning by adding
home.enableNixpkgsReleaseCheck = false;
to your configuration.
Suppression the warning never be a good idea. I want to fix the problem.
Let's see the both versions:
nix-channel --list
home-manager https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz
nixpkgs https://nixos.org/channels/nixos-unstable/25.05
My Nixpkgs version is unstabled one (version 25?) whereas home-manager is 24.11, stabled one. I want to change (downgrade) nikPkgs to 24.11. how can i do that?
Run these commands and call it a day.
# Switch to nixos-24.11 channel
nix-channel --remove nixpkgs
nix-channel --add https://nixos.org/channels/nixos-24.11 nixpkgs
# Update channels
nix-channel --update
# Clean old packages and update
nix-env --delete-generations old
nix-collect-garbage -d
nix-env -u --always