Ah, in that case you were using an outdated version of home-manager. Likely stuck on an old stable version. If you use nixpkgs unstable, you should use the unstable branch of home-manager as well. Occasionally breakage may still occur, but it will be shorter lived. If you don’t want any of these issues, use the same stable version for both.
These kinds of problems are due to home-manager relying on some NixOS semi-internals, and they currently live in separate repositories, with no good way to match commits. This may be fixed in the future either by a more aggressive adoption of flakes or this discussion: Duplication home-manager and nixos modules - #9 by AndersonTorres