Home Manager and Nixpkgs version mismatch (wo/ flakes)

I’ve been trying NixOS for the past year and now I find myself with a warning message about version mismatching.

~≻ nix-channel --list
nixos https://channels.nixos.org/nixos-25.11
nixpkgs https://channels.nixos.org/nixpkgs-25.11-darwin
unstable https://nixos.org/channels/nixpkgs-unstable

home.nix

{ ... }:
let
  home-manager = builtins.fetchTarball
    # "https://github.com/nix-community/home-manager/archive/master.tar.gz";
    "https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz";
in {
  imports = [ (import "${home-manager}/nixos") ];

  home-manager.users.sowdowdow = { pkgs, ... }: {
    # The home.stateVersion option does not have a default and must be set
    home.stateVersion = "25.11";
    home.packages = [ pkgs.gitui ];
    home.shell.enableFishIntegration = true;

    programs.ghostty = { ... };
  };
}

configuration.nix

# useful git configuiration pulling
# https://dev.to/raymondgh/day-5-syncing-nix-config-across-laptop-and-desktop-1i41

# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ pkgs, ... }:

{
  imports = [ # Include the results of the hardware scan.
    ./hardware-configuration.nix
    ./home.nix
    ./firefox.nix
  ];

   ...

  nix.settings.experimental-features = [ "nix-command" "flakes" ];

  users.users.sowdowdow = {
    isNormalUser = true;
    description = "sowdowdow";
    extraGroups = [ "networkmanager" "wheel" "docker" ];

    packages = with pkgs; [ ... ];
  };

  environment.systemPackages = with pkgs; [ ... ];

  system.stateVersion = "24.05"; 

  system.autoUpgrade.enable = true;
  system.autoUpgrade.allowReboot = false;
  # this one was added manually and can be changed
  system.autoUpgrade.channel = "https://nixos.org/channels/nixos-25.11";

  # to gain some space (a few GB)
  # source https://nixos.wiki/wiki/Storage_optimization
  nix.optimise.automatic = true;
  nix.gc = {
    automatic = true;
    dates = "weekly";
    options = "--delete-older-than 30d";
  };
}

And here is the warning I get everytime :

~≻ sudo nixos-rebuild dry-build --upgrade
unpacking 1 channels...
building the system configuration...
evaluation warning: sowdowdow profile: You are using

                      Home Manager version 25.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.

Any help would be appreciated :blush:

What does

sudo nix-channel --list

say?

~≻ sudo nix-channel --list
nixos https://channels.nixos.org/nixos-25.05

Thank you very much, this seems to solve the issue :
sudo nix-channel --add https://channels.nixos.org/nixos-25.11 nixos

But i’m confused now, can you explain me or redirect me to a good ressource to understand what’s happening ?

nix channels are managed by each user individually and the user channels get layered on top of the root channels.

I’d recommend you remove all the channels managed by your user and only use nix-channel with root/sudo.

4 Likes

Or better, use a mechanism that doesn’t rely on channels (npins, or flakes, or whatever). There’s a million posts about all of these.

Not really a good sign.

There’s a million posts explaining how to migrate to these. There’s a million posts about channels, too. The same questions will get asked repeatedly, that’s just the nature of a help forum. It is a good sign in the sense that they are getting used a fair bit and there are people to answer questions about it.

For the average new user, diagnosing the NIX_PATH envvar, channel lists, and defexpr across two different users seems like more work than just npins init; npins add channel nixos-25.11 --name nixpkgs and putting the boilerplate in the config, but you do you.

1 Like