From 0d3ad9e7ffca6d63ee1e7548b3ef88cb5ea7bc41 Mon Sep 17 00:00:00 2001 From: Emily Date: Sun, 16 Jul 2023 20:09:12 +0100 Subject: [PATCH] documentation: use `eval-config.nix` Avoid letting the module evaluation for the documentation drift out of sync with how system configurations are evaluated. --- modules/documentation/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/documentation/default.nix b/modules/documentation/default.nix index 2f3bb9a..49bba72 100644 --- a/modules/documentation/default.nix +++ b/modules/documentation/default.nix @@ -11,9 +11,9 @@ let regularConfig = config; argsModule = { - config._module.args = regularConfig._module.args // { + config._module.args = lib.mkForce (regularConfig._module.args // { modules = [ ]; - }; + }); }; /* For the purpose of generating docs, evaluate options with each derivation @@ -28,8 +28,9 @@ let inherit (config.system) nixpkgsRevision; options = let - scrubbedEval = evalModules { - modules = baseModules ++ [ argsModule ]; + scrubbedEval = import ../../eval-config.nix { + inherit lib; + modules = [ argsModule ]; specialArgs = { pkgs = scrubDerivations "pkgs" pkgs; }; }; scrubDerivations = namePrefix: pkgSet: mapAttrs