Fn `homeManagerConfiguration` missing arg `system`, but why?

I have not seen any of the examples, anywhere, pass anything involving the identifier system to home-manager.lib.homeManagerConfiguration aside from the pkgs attribute needing to be assigned.

$ nix build --no-link .#homeConfigurations.jacob.activationPackage
error: 'homeManagerConfiguration' at /nix/store/d5j5vgsfvwkaqmc1qhwaay5mp51yaqkm-source/flake.nix:44:36 called without required argument 'system'

       at /nix/store/47kakq2ca4llzvjpfg64s5vf1xba3j2f-source/flake.nix:37:15:

           36|     homeConfigurations = {
           37|       jacob = home-manager.lib.homeManagerConfiguration {
             |               ^
           38|         inherit pkgs;

I’m very confused, as far as I can tell I am running the right command, and my config has the same stuff as the examples. It isn’t very complicated yet.


For a second question: What is the difference between pkgs = nixpkgs.legacyPackages."x86_64-linux" and the import that I have above?

Third, where do I read about functions such as home-manager.lib.homeManagerConfiguration and attributes like nixpkgs.legacyPackages?

As explained in the discord already: The error message suggests that you use a stable HM with the calling convention for the unstable one.

Sadly only the documentation built from master is available online, though there is a way to build the docs for your very exact version via docs.html.enable or something…

Then you can open them via home-manager-help IIRC.

By using legacyPackages you enable home manager to change nixpkgs related configuration after the fact. If you import manually with config set, HM can not change it anymore.

The purpose of legacyPackages is explained in the nix manual IIRC, lib by itself is sadly not a “blessed” attribute and it’s just a community convention that you’ll usually find functions there.

The documentation of the actual functions in that set should be done somehow by the author of the flake you use it from.

In general, a flakes output have to be documented by the flakes author, by their means.

There is no central way of doing it, and there is also no standard in documenting them.

Also: please stop crossposting in chat and forum, or at least post a small update here/chat when you found a solution on the other medium.

1 Like