nixos/modules/misc/documentation.nix: Don't use toString on a path

It gives a warning on the lazy-trees branch of Nix
(https://github.com/NixOS/nix/pull/6530) and should generally be
avoided because it causes an unnecessary copy to the store.

Changed files
+5 -3
nixos
modules
+5 -3
nixos/modules/misc/documentation.nix
···
)
pkgSet;
in scrubbedEval.options;
+
baseOptionsJSON =
let
filter =
···
);
in
pkgs.runCommand "lazy-options.json" {
-
libPath = filter "${toString pkgs.path}/lib";
-
pkgsLibPath = filter "${toString pkgs.path}/pkgs/pkgs-lib";
-
nixosPath = filter "${toString pkgs.path}/nixos";
+
libPath = filter (pkgs.path + "/lib");
+
pkgsLibPath = filter (pkgs.path + "/pkgs/pkgs-lib");
+
nixosPath = filter (pkgs.path + "/nixos");
modules = map (p: ''"${removePrefix "${modulesPath}/" (toString p)}"'') docModules.lazy;
} ''
export NIX_STORE_DIR=$TMPDIR/store
···
exit 1
} >&2
'';
+
inherit (cfg.nixos.options) warningsAreErrors allowDocBook;
};