Home Manager complaining about nixpkgs version mismatch

I recently discovered I wasn’t updating all of my flakes, which caused some errors as things evolved. But now that I update all flakes, I’m getting a new warning.

Previous command: nix flake lock --update-input nixpkgs .
Current command: nix flake update .

This causes a warning about a version mismatch between Home Manager and nixpkgs:

warning: updating lock file '/home/nairou/.persist/home-manager/flake.lock':
• Updated input 'home-manager':
    'github:nix-community/home-manager/d82c9af8175878a461a0fdf914e67cc446664570' (2023-04-26)
  → 'github:nix-community/home-manager/9f82227b64245c273d98dd02dedd44fc7576041e' (2023-05-30)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/3005f20ce0aaa58169cdee57c8aa12e5f1b6e1b3' (2023-05-20)
  → 'github:nixos/nixpkgs/5e871d8aa6f57cc8e0dc087d1c5013f6e212b4ce' (2023-05-29)
• Updated input 'nixvim':
    'github:pta2002/nixvim/079b0c30cde91a735a7a1707ed6bf2571a1c93cc' (2023-05-07)
  → 'github:pta2002/nixvim/cf6a614e8b89eea8f989ef6103debe65984a1fd5' (2023-05-29)
• Updated input 'nixvim/pre-commit-hooks':
    'github:cachix/pre-commit-hooks.nix/fb58866e20af98779017134319b5663b8215d912' (2023-04-27)
  → 'github:cachix/pre-commit-hooks.nix/61e567d6497bc9556f391faebe5e410e6623217f' (2023-05-23)
• Updated input 'zig':
    'github:mitchellh/zig-overlay/25ea43b1d64b93523f2463738b9308a07af530df' (2023-04-29)
  → 'github:mitchellh/zig-overlay/d5a84c5a51ae76b862492224b12f8abe35efabba' (2023-05-30)
trace: warning: You are using

  Home Manager version 23.05 and
  Nixpkgs version 23.11.

Using mismatched versions is likely to cause errors and unexpected
behavior. It is therefore highly recommended to use a release of Home
Manager than corresponds with your chosen release of Nixpkgs.

If you insist then you can disable this warning by adding

  home.enableNixpkgsReleaseCheck = false;

to your configuration.

No errors, but still I’d like to resolve the warning. I’ve still got stateVersion = "22.11" in my NixOS and Home Manager configurations, so I don’t know where the “23.05” and “23.11” versions come from. I do use nixpkgs-unstable for both, but I’d have expected those to stay relatively in sync.

What would cause these versions to update, and why would there now be a mismatch?

Either you are using the 23.05 branch in your flake’s inputs as url for home-manager or home-manager hasn’t yet fully caught up with the recent branch-off of NixOS 23.05.

In any case, this is unrelated to stateVersion, which is used to detect any breaking changes before an update.

1 Like

seems like home-manager just has an outdated release version

1 Like

Yeah, I hope to finish the master and release-23.05 branches during my commute home today.

2 Likes

@nairou Please give it another try. Hopefully I managed to set the branches up correctly.

1 Like

That did the trick! Warning messages are gone. Thank you!

Sorry, to bump an old post.

But, running into the same problem with nixpkgs-23.11 and home-manager 24.05

@KotUW This is the intended behaviour.You shouldn’t mix home-manager 24.05 with nixpkgs 23.11.

Thanks for replying,

My flake looks good to me. https://github.com/KotUW/dotfiles-homeManager/blob/84e53cccba483b2ff0871b7b64b622886043e16c/flake.nix

The flake was generated by following the install instructions in home-manager manual (Home Manager Manual)[here]

That should be:

inputs = {
    # Specify the source of Home Manager and Nixpkgs.
    nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
    home-manager = {
      url = "github:nix-community/home-manager/release-23.11";  # this selects the release-branch and needs to match Nixpkgs
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
5 Likes

I have NixOS 23.11 and installed home-manager by simply adding it to environment.systemPackages.

How do I get rid of this warning?

Use one of the supported installation methods: Home Manager Manual