osConfig is only available when using home-manager through the NixOS/nix-darwin modules. If you’re using home-manager standalone, it doesn’t have access to the OS config because it’s not being evaluated as part of building an OS configuration.
Thanks for the response. I think I understand the problem, but need help with one more thing.
Currently I use flakes for my system configuration and - you’re right - home-manager is not a system module.
(For clarity I skipped some lines in the snippet below)
Which in my understanding should solve the problem, but now I don’t know how to inject nixvim.homeManagerModules.nixvim and nur.nixosModules.nur modules into home-manager. When I naively uncomment them, I get an error saying “module home not defined”.