11 modulesPath = "${nixosPath}/modules";
12 # dummy pkgs set that contains no packages, only `pkgs.lib` from the full set.
13 # not having `pkgs.lib` causes all users of `pkgs.formats` to fail.
14 pkgs = import pkgsLibPath {
18 utils = import "${nixosPath}/lib/utils.nix" {
22 # this is used both as a module and as specialArgs.
23 # as a module it sets the _module special values, as specialArgs it makes `config`
24 # unusable. this causes documentation attributes depending on `config` to fail.
26 _module.check = false;
28 system.stateVersion = stateVersion;
30 eval = lib.evalModules {
31 modules = (map (m: "${modulesPath}/${m}") modules) ++ [
35 inherit config pkgs utils;
39 docs = import "${nixosPath}/doc/manual" {
42 # duplicate of the declaration in all-packages.nix
43 buildPackages.nixosOptionsDoc = attrs:
44 (import "${nixosPath}/lib/make-options-doc")
45 ({ inherit pkgs lib; } // attrs);
47 config = config.config;
48 options = eval.options;
50 revision = "release-${release}";