From 82ad8c5ce09fe942efac95c176509f1e13da10b8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 17 Oct 2013 13:43:40 +0200 Subject: [PATCH] Make manual generation not depend on the user's configuration Previously changing the value of certain options in configuration.nix would cause the manual to be regenerated, because some option defaults depend on the configuration. This is undesirable because rebuilding the manual is kind of slow. So now the manual reflects an empty configuration. The downside is that this requires another call to fixMergeModules, which adds about 14% to evaluation time. Probably worth it. --- nixos/modules/services/misc/nixos-manual.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/misc/nixos-manual.nix b/nixos/modules/services/misc/nixos-manual.nix index 38f1917a46a..1260272b68e 100644 --- a/nixos/modules/services/misc/nixos-manual.nix +++ b/nixos/modules/services/misc/nixos-manual.nix @@ -3,7 +3,7 @@ # of the virtual consoles. The latter is useful for the installation # CD. -{ config, pkgs, options, ... }: +{ config, pkgs, baseModules, ... } @ extraArgs: with pkgs.lib; @@ -13,7 +13,11 @@ let manual = import ../../../doc/manual { inherit (cfg) revision; - inherit pkgs options; + inherit pkgs; + options = (fixMergeModules baseModules + (removeAttrs extraArgs ["config" "options"]) // { + modules = [ ]; + }).options; }; entry = "${manual.manual}/share/doc/nixos/manual.html";