summary refs log tree commit diff
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-17 13:43:40 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-17 13:43:40 +0200
commit82ad8c5ce09fe942efac95c176509f1e13da10b8 (patch)
tree8db748d5331bafab74147d8bb78a5d0f5667b341 /nixos/modules/services
parentb33657df03e411441625019f1cfe1e1b08135497 (diff)
downloadnixpkgs-82ad8c5ce09fe942efac95c176509f1e13da10b8.tar
nixpkgs-82ad8c5ce09fe942efac95c176509f1e13da10b8.tar.gz
nixpkgs-82ad8c5ce09fe942efac95c176509f1e13da10b8.tar.bz2
nixpkgs-82ad8c5ce09fe942efac95c176509f1e13da10b8.tar.lz
nixpkgs-82ad8c5ce09fe942efac95c176509f1e13da10b8.tar.xz
nixpkgs-82ad8c5ce09fe942efac95c176509f1e13da10b8.tar.zst
nixpkgs-82ad8c5ce09fe942efac95c176509f1e13da10b8.zip
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.
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/misc/nixos-manual.nix8
1 files 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";