nixos-manager icon indicating copy to clipboard operation
nixos-manager copied to clipboard

nixos-manager needs `manual.json.enable = true`

Open Mic92 opened this issue 4 years ago • 6 comments

.nix-profile/share/doc/home-manager/options.json is not created by default. If the file does not exists, nixos-manager fails to start.

Mic92 avatar May 01 '20 16:05 Mic92

Ah yes, thanks for the reminder. I've added a note about that to the readme. I'm keeping this issue open for some amount of time so maybe someone smart can figure out how to generate the options JSON file without reconfiguring home-manager. :)

pmiddend avatar May 02 '20 06:05 pmiddend

I think this derivation is not exposed yet. However @rycee could help to support it.

Mic92 avatar May 11 '20 09:05 Mic92

@Mic92 What do you mean by "exposed". Would it be sufficient to switch the default of the manual.json.enable option from false to true? I.e., that ~/.nix-profile/share/doc/home-manager/options.json is generated by default.

rycee avatar May 11 '20 21:05 rycee

@rycee I mean it would be helpful to get these options.json without having to create a profile in the first place. One workaround is to build a dummy profile using home-manager build and then get the options from ./result:

$ home-manager build
$ ls -la result/home-path/share/doc/home-manager/options.json

However I think that if only the options.json has to be build, the build might be faster.

Mic92 avatar May 11 '20 23:05 Mic92

Sorry, I forgot about this issue. Some time ago it became possible to build the different doc output directly from HM's root default.nix. For example,

$ nix-build https://github.com/rycee/home-manager/archive/master.tar.gz -A docs.json
/nix/store/rzgi5sngazifzw41z9v8qbkji17appqb-options.json

Would that be sufficient for your purposes?

rycee avatar Jul 05 '20 10:07 rycee

Sorry, I forgot about this issue. Some time ago it became possible to build the different doc output directly from HM's root default.nix. For example,

$ nix-build https://github.com/rycee/home-manager/archive/master.tar.gz -A docs.json
/nix/store/rzgi5sngazifzw41z9v8qbkji17appqb-options.json

Would that be sufficient for your purposes?

Yes. That should be enough.

Mic92 avatar Jul 06 '20 21:07 Mic92