A shared home-manager configuration between NixOS and nix-darwin?

Your mistake is using //, you should never use this in the module system, same with import.

// does not recursively update. Even lib.recursiveUpdate is massively incorrect though, it will not respect order or priority as modules do.

Just write out the config.
If you want to reference another file, add it to imports (unrelated to import).
If you want to merge multiple config attrsets, use lib.mkMerge - well imports handles this for you, but if you want to have e.g. conditionals then it may be cleaner to use lib.mkMerge.

1 Like