Home-manager falsely warns about using nixpkgs 25.05?

Dear all,

I set up a new laptop using Aurora (Fedora-based) and installed nix and home-manager, as on my other laptops. However on this one something leads to home-manager warning about a mismatch in the channels.

trace: 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.

The channels are the same as on another fedora-based machine:

$ nix-channel --list
home-manager https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz
nixgl https://github.com/nix-community/nixGL/archive/main.tar.gz
nixpkgs https://nixos.org/channels/nixos-24.11

I am not aware of any missing parts in my configuration, so I am a little puzzled why this happens on this machine but not on the others?

Any ideas where I could start digging?

Kind Regards,
Johannes

Are you, by chance, using flakes? That is, is there a flake.nix file along your home-manager config?

Sorry, forgot to add that information. I am not using flakes.

What’s the output of the following?

nix-shell -p nix-info --run "nix-info -m" 

and

nix-instantiate --eval --expr '(import <nixpkgs> {}).lib.trivial.release'
$ nix-shell -p nix-info --run "nix-info -m" 
these 3 paths will be fetched (0.03 MiB download, 0.12 MiB unpacked):
  /nix/store/591apldfgm1gr238rbfc8ib0y1z8ng2y-gcc-wrapper-14-20241116
  /nix/store/dbgbmvhhg2sahm4hxprdrjn45jm0iw8p-nix-info
  /nix/store/acjcsq0iim1lg14f8jvka05dhhz70c2c-stdenv-linux
copying path '/nix/store/dbgbmvhhg2sahm4hxprdrjn45jm0iw8p-nix-info' from 'https://cache.nixos.org'...
copying path '/nix/store/591apldfgm1gr238rbfc8ib0y1z8ng2y-gcc-wrapper-14-20241116' from 'https://cache.nixos.org'...
copying path '/nix/store/acjcsq0iim1lg14f8jvka05dhhz70c2c-stdenv-linux' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 6.11.8-300.fc41.x86_64, Aurora, 41.20250126.1 (Kinoite), a9e13f9`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.25.3`
 - nixpkgs: `/nix/store/0p3h8sfhb6a7jwdq39w83y4h4p2rqgph-source`
$
$ nix-instantiate --eval --expr '(import <nixpkgs> {}).lib.trivial.release'
"25.05"
$

Okay, so the 25.05 is coming from nixpkgs in your NIX_PATH, although I’m not 100% sure how it ended up there.

What about the following?

printenv NIX_PATH
sudo printenv NIX_PATH
sudo nix-channel --list

Thanks for the help. Looks like NIX_PATH is not set, neither for my user nor via sudo. Both do not return any output.

sudo nix-channel --list spits out an error, as the command cannot be found. This is perfectly normal, the same happens on other of my machines.

Not sure why NIX_PATH is not being populated properly, but it looks like it could be the main culprit. After setting it to $HOME/.nix-defexpr/channels the nix-instantiate command from above results in 24.11 and not 25.05 anymore.

Is your user’s shell config managed with HM? If not, it makes sense why NIX_PATH isn’t set.

The user’s shell is now being configured by home-manager, after the installation was successful. Now NIX_PATH is being set.

But as I never had any such issues on other machines during the initial installation, I daresay something changed or went wrong during installation.

I’ll open a bug report in the Determinate installer repository.

Thanks for your help!

Kind Regards,
Johannes