You’re absolutely right, Nix (and the module system) are lazy by design. Also, after taking a brief look at your config I don’t see anything related to the Nextcloud server-module.
However generating a manual which contains documentation for all options available isn’t as lazy and expects all option definitions (not the option’s values though) to be valid. In fact, whenever you build your system configuration, a version of the NixOS manual is built by default as well for man configuration.nix
and nixos-help
(if you want to skip the manual build, you can declare documentation.enable = false;
).
In order to understand why the module (to be precise, the option services.nextcloud.package
) broke your evaluation, you may want to take a look at the option’s definition (which needs to be valid for the manual build):
As you can see, the option expects a package which contains the Nextcloud server. The relatedPackages
option specifies a list of possible values (i.e. the currently packaged major versions of Nextcloud that are supported by this module).
The manual-builder links the packages to the options in the end and thus expects those to exist.
Does this explain the issue to you?