From 953770f339f3c5b9afd6109f43e24b23fc296a26 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Mon, 21 Feb 2022 01:15:27 +0000 Subject: [PATCH] Re-enable installer documentation --- home-manager/default.nix | 2 ++ nixos/default.nix | 1 + nixos/installer.nix | 5 ++--- nixos/modules/common.nix | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/home-manager/default.nix b/home-manager/default.nix index b219b7f..e4b0b59 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -42,6 +42,8 @@ let options = { inherit (commonOpts) system nixpkgs home-manager; # TODO: docCustom for home-manager? + # Not possible I think, the doc generation code only ever includes its own modules... + # (https://github.com/nix-community/home-manager/blob/0232fe1b75e6d7864fd82b5c72f6646f87838fc3/docs/default.nix#L37) homeDirectory = mkOpt' str null "Absolute path to home directory."; username = mkOpt' str null "Username for the configuration."; diff --git a/nixos/default.nix b/nixos/default.nix index ecf12b4..04b2230 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -98,6 +98,7 @@ let inherit (commonOpts) system nixpkgs home-manager; hmNixpkgs = commonOpts.nixpkgs; # This causes a (very slow) docs rebuild on every change to a module's options it seems + # TODO: Currently broken with infinite recursion... docCustom = mkBoolOpt' false "Whether to document nixfiles' custom NixOS modules."; configuration = mkOption { diff --git a/nixos/installer.nix b/nixos/installer.nix index 0df78d4..1ba6bcf 100644 --- a/nixos/installer.nix +++ b/nixos/installer.nix @@ -80,9 +80,8 @@ # Much of this onwards is yoinked from modules/profiles/installation-device.nix # Good to have docs in the installer! - # TODO: docs rebuilding every time? - documentation.enable = mkForce false; - documentation.nixos.enable = mkForce false; + documentation.enable = mkForce true; + documentation.nixos.enable = mkForce true; # Enable wpa_supplicant, but don't start it by default. networking.wireless.enable = mkDefault true; diff --git a/nixos/modules/common.nix b/nixos/modules/common.nix index 4c24ddd..b512b26 100644 --- a/nixos/modules/common.nix +++ b/nixos/modules/common.nix @@ -65,6 +65,7 @@ in }; documentation = { + enable = mkDefault true; nixos = { enable = mkDefault true; options.warningsAreErrors = mkDefault false;