For example:
{ config, lib, ... }:
with lib;
let
cfg = config.me;
in
{
...
options.me.hmConfig = mkOption { # I want to make this can be merged.
description = "hm";
default = _: {};
}
config.home-manager.users.me = mkMerge [
(_: { ... })
cfg.hmConfig
];
}
I want to let me.hmConfig
have merge
property.
I tried type = options.home-manager.users.type.nestedTypes.elemType
and type = functionTo attrs
but both of them cannot work. The first one is failed due to infinity recursion.