I recently migrated my NixOS + home-manager configuration to flakes. I am using home-manager as a NixOS module.
In a flake, when you enable a program/service in home-manager, and do not provide the package option, how does it decide what nixpkgs to pull it from? I don’t think that it calls <nixpkgs> because that would not work in a flake without the --impure option.
By default HM will just use the same version of nixpkgs that the system is build from (with all overlays and unfree settings, etc). When you haven’t enabled it, it will still use the same nixpkgs, but as a fresh import and you have to do your configuration on your own using nixpkgs.*
Until recently, home-manager standalone would instantiate its nixpkgs input by default, though as I understand it, it now requires that you explicitly specify its pkgs attribute. (which must make the nixpkgs.* options confusingly non-functional in most cases…)