diff options
author | pennae <github@quasiparticle.net> | 2021-11-19 00:26:27 +0100 |
---|---|---|
committer | pennae <github@quasiparticle.net> | 2022-01-02 19:46:13 +0100 |
commit | fc614c37c653637e5475a0b0a987489b4d1f351d (patch) | |
tree | 7b2470a3a67979ddcc51f18bb0d424f8e95908b1 /nixos/modules/services | |
parent | 55daffc1c943bddb71dc89a606f8284f6d50f5bd (diff) | |
download | nixlib-fc614c37c653637e5475a0b0a987489b4d1f351d.tar nixlib-fc614c37c653637e5475a0b0a987489b4d1f351d.tar.gz nixlib-fc614c37c653637e5475a0b0a987489b4d1f351d.tar.bz2 nixlib-fc614c37c653637e5475a0b0a987489b4d1f351d.tar.lz nixlib-fc614c37c653637e5475a0b0a987489b4d1f351d.tar.xz nixlib-fc614c37c653637e5475a0b0a987489b4d1f351d.tar.zst nixlib-fc614c37c653637e5475a0b0a987489b4d1f351d.zip |
nixos/documentation: split options doc build
most modules can be evaluated for their documentation in a very restricted environment that doesn't include all of nixpkgs. this evaluation can then be cached and reused for subsequent builds, merging only documentation that has changed into the cached set. since nixos ships with a large number of modules of which only a few are used in any given config this can save evaluation a huge percentage of nixos options available in any given config. in tests of this caching, despite having to copy most of nixos/, saves about 80% of the time needed to build the system manual, or about two second on the machine used for testing. build time for a full system config shrank from 9.4s to 7.4s, while turning documentation off entirely shortened the build to 7.1s.
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/backup/sanoid.nix | 5 | ||||
-rw-r--r-- | nixos/modules/services/desktops/pipewire/pipewire-media-session.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/desktops/pipewire/pipewire.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/hardware/thinkfan.nix | 3 | ||||
-rw-r--r-- | nixos/modules/services/misc/matrix-appservice-irc.nix | 3 | ||||
-rw-r--r-- | nixos/modules/services/networking/dnscrypt-proxy2.nix | 3 | ||||
-rw-r--r-- | nixos/modules/services/networking/kea.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/networking/searx.nix | 3 | ||||
-rw-r--r-- | nixos/modules/services/security/vaultwarden/default.nix | 3 | ||||
-rw-r--r-- | nixos/modules/services/web-apps/dex.nix | 3 | ||||
-rw-r--r-- | nixos/modules/services/web-apps/gerrit.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/web-apps/jirafeau.nix | 3 | ||||
-rw-r--r-- | nixos/modules/services/web-apps/nextcloud.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/web-apps/powerdns-admin.nix | 3 | ||||
-rw-r--r-- | nixos/modules/services/x11/xserver.nix | 2 |
15 files changed, 39 insertions, 2 deletions
diff --git a/nixos/modules/services/backup/sanoid.nix b/nixos/modules/services/backup/sanoid.nix index e70063415ec0..5eb031b2e9f0 100644 --- a/nixos/modules/services/backup/sanoid.nix +++ b/nixos/modules/services/backup/sanoid.nix @@ -51,7 +51,10 @@ let datasetOptions = rec { use_template = mkOption { description = "Names of the templates to use for this dataset."; - type = types.listOf (types.enum (attrNames cfg.templates)); + type = types.listOf (types.str // { + check = (types.enum (attrNames cfg.templates)).check; + description = "configured template name"; + }); default = [ ]; }; useTemplate = use_template; diff --git a/nixos/modules/services/desktops/pipewire/pipewire-media-session.nix b/nixos/modules/services/desktops/pipewire/pipewire-media-session.nix index 4be3e881a9dc..803438b6f7e5 100644 --- a/nixos/modules/services/desktops/pipewire/pipewire-media-session.nix +++ b/nixos/modules/services/desktops/pipewire/pipewire-media-session.nix @@ -29,6 +29,8 @@ in { meta = { maintainers = teams.freedesktop.members; + # uses attributes of the linked package + buildDocsInSandbox = false; }; ###### interface diff --git a/nixos/modules/services/desktops/pipewire/pipewire.nix b/nixos/modules/services/desktops/pipewire/pipewire.nix index 55755ecd6457..372b4785f185 100644 --- a/nixos/modules/services/desktops/pipewire/pipewire.nix +++ b/nixos/modules/services/desktops/pipewire/pipewire.nix @@ -40,6 +40,8 @@ in { meta = { maintainers = teams.freedesktop.members; + # uses attributes of the linked package + buildDocsInSandbox = false; }; ###### interface diff --git a/nixos/modules/services/hardware/thinkfan.nix b/nixos/modules/services/hardware/thinkfan.nix index 4ea829e496e8..1c5b428d5d65 100644 --- a/nixos/modules/services/hardware/thinkfan.nix +++ b/nixos/modules/services/hardware/thinkfan.nix @@ -221,4 +221,7 @@ in { boot.extraModprobeConfig = "options thinkpad_acpi experimental=1 fan_control=1"; }; + + # uses relatedPackages + meta.buildDocsInSandbox = false; } diff --git a/nixos/modules/services/misc/matrix-appservice-irc.nix b/nixos/modules/services/misc/matrix-appservice-irc.nix index 02627e51c932..b041c9c82c56 100644 --- a/nixos/modules/services/misc/matrix-appservice-irc.nix +++ b/nixos/modules/services/misc/matrix-appservice-irc.nix @@ -226,4 +226,7 @@ in { isSystemUser = true; }; }; + + # uses attributes of the linked package + meta.buildDocsInSandbox = false; } diff --git a/nixos/modules/services/networking/dnscrypt-proxy2.nix b/nixos/modules/services/networking/dnscrypt-proxy2.nix index dc6a019e9b77..316e6e37f9da 100644 --- a/nixos/modules/services/networking/dnscrypt-proxy2.nix +++ b/nixos/modules/services/networking/dnscrypt-proxy2.nix @@ -118,4 +118,7 @@ in }; }; }; + + # uses attributes of the linked package + meta.buildDocsInSandbox = false; } diff --git a/nixos/modules/services/networking/kea.nix b/nixos/modules/services/networking/kea.nix index 4da47f575f79..17b4eb2e283b 100644 --- a/nixos/modules/services/networking/kea.nix +++ b/nixos/modules/services/networking/kea.nix @@ -378,4 +378,6 @@ in ]); meta.maintainers = with maintainers; [ hexa ]; + # uses attributes of the linked package + meta.buildDocsInSandbox = false; } diff --git a/nixos/modules/services/networking/searx.nix b/nixos/modules/services/networking/searx.nix index 9fb06af7442e..6fd81521e7fb 100644 --- a/nixos/modules/services/networking/searx.nix +++ b/nixos/modules/services/networking/searx.nix @@ -228,5 +228,6 @@ in }; meta.maintainers = with maintainers; [ rnhmjoj ]; - + # uses relatedPackages + meta.buildDocsInSandbox = false; } diff --git a/nixos/modules/services/security/vaultwarden/default.nix b/nixos/modules/services/security/vaultwarden/default.nix index 5b951bc85ec0..71088fc4dcd8 100644 --- a/nixos/modules/services/security/vaultwarden/default.nix +++ b/nixos/modules/services/security/vaultwarden/default.nix @@ -179,4 +179,7 @@ in { wantedBy = [ "multi-user.target" ]; }; }; + + # uses attributes of the linked package + meta.buildDocsInSandbox = false; } diff --git a/nixos/modules/services/web-apps/dex.nix b/nixos/modules/services/web-apps/dex.nix index f08dd65bdb0f..4d4689a4cf24 100644 --- a/nixos/modules/services/web-apps/dex.nix +++ b/nixos/modules/services/web-apps/dex.nix @@ -112,4 +112,7 @@ in }; }; }; + + # uses attributes of the linked package + meta.buildDocsInSandbox = false; } diff --git a/nixos/modules/services/web-apps/gerrit.nix b/nixos/modules/services/web-apps/gerrit.nix index 9ee9dbf1aa49..6bfc67368dd5 100644 --- a/nixos/modules/services/web-apps/gerrit.nix +++ b/nixos/modules/services/web-apps/gerrit.nix @@ -237,4 +237,6 @@ in }; meta.maintainers = with lib.maintainers; [ edef zimbatm ]; + # uses attributes of the linked package + meta.buildDocsInSandbox = false; } diff --git a/nixos/modules/services/web-apps/jirafeau.nix b/nixos/modules/services/web-apps/jirafeau.nix index 83cf224f7d27..a95e2b4f82a9 100644 --- a/nixos/modules/services/web-apps/jirafeau.nix +++ b/nixos/modules/services/web-apps/jirafeau.nix @@ -167,4 +167,7 @@ in "d ${cfg.dataDir}/async/ 0750 ${user} ${group} - -" ]; }; + + # uses attributes of the linked package + meta.buildDocsInSandbox = false; } diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 6692d67081c5..e04b30a7d62d 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -932,4 +932,6 @@ in { ]); meta.doc = ./nextcloud.xml; + # uses relatedPackages + meta.buildDocsInSandbox = false; } diff --git a/nixos/modules/services/web-apps/powerdns-admin.nix b/nixos/modules/services/web-apps/powerdns-admin.nix index ce99b606c318..4661ba80c5d6 100644 --- a/nixos/modules/services/web-apps/powerdns-admin.nix +++ b/nixos/modules/services/web-apps/powerdns-admin.nix @@ -146,4 +146,7 @@ in group = "powerdnsadmin"; }; }; + + # uses attributes of the linked package + meta.buildDocsInSandbox = false; } diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 24d925734423..f0cabdd4465a 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -865,4 +865,6 @@ in }; + # uses relatedPackages + meta.buildDocsInSandbox = false; } |