Skip to content

bug: programs.ssh.matchBlocks fails to build #8097

@Sgiath

Description

@Sgiath

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

After I updated the Home Manager to the latest version (nixpkgs unstable, HM master) I am getting this error:

       error: The option `home-manager.users.sgiath.programs.ssh.matchBlocks' has a type `DAG of submodule' that uses
       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 */; }

I am an user of NixOS and HM but I do not write the definitions that much. So I am not sure what is wrong but it seems like the issue is with how the ssh module is written inside HomeManager, not in my own configuration. Anyway here is my config for reference that worked up until last week:
https://git.sr.ht/~sgiath/nixos-config/tree/master/item/modules/home/sgiath/ssh.nix

Maintainer CC

@rycee

System information

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.17.4-xanmod1, NixOS, 25.11 (Xantusia), 25.11.20251025.6a08e6b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.32.1`
 - nixpkgs: `/nix/store/jd3y5kfy3ywv9lc229nz8vxqbrcyv93d-source`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtriageIssues or feature request that have not been triaged yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions