Incompatible with the v2 merge mechanism

Hi,

I did not change my config and just did an update (on unstable) and had this:

error: The option `home-manager.users.geob.programs.fish.binds.ctrl-backspace.command' has a type `string…
┃        an ad-hoc `type // { check = ...; }' override, which is incompatible with
┃        the v2 merge mechanism.
┃
┃        Please use `lib.types.addCheck` instead of `type // { check }' to add
┃        custom validation. For example:
┃
┃          lib.types.addCheck baseType (value: /* your check */)
┃
┃        instead of:
┃
┃          baseType // { check = value: /* your check */; }
┃
┃        Alternatively, this message may also occur as false positive when mixing Nixpkgs
┃        versions, if one Nixpkgs is between 83fed2e6..58696117 (Aug 28 - Oct 28 2025)

What’s happening?

1 Like

As the error says, home-manager needs patching here: home-manager/modules/programs/fish.nix at fdc36b12804b0179b24a5ffd282e4c95c37072e2 · nix-community/home-manager · GitHub

1 Like

Thanks for your answer!

So just need to wait for HM to update then?

Specifically, someone needs to fix it on their end.

Someone? I though the link above was upstream

Anyone can make a pull request to h-m, even you if you wanted to. Someone in h-m will then have to review and merge it. No one has done any of that yet.

Ideally you can report the error to h-m if you want to speed up that process.

After all that, then you can update h-m to fix the error.

edit: seems there is a PR already open after all, so no issue needed - Use addCheck in fish module by s9gf4ult · Pull Request #9939 · nix-community/home-manager · GitHub

3 Likes