From d206f2304fad797d1ba37c75a80d7251cfec0654 Mon Sep 17 00:00:00 2001 From: Danylo Hlynskyi Date: Sun, 15 Dec 2019 18:21:52 +0200 Subject: [PATCH] nixos containers: disable NixOS manual in container config. (#75659) This makes ~2.5x speed up of an empty container instantiate, hence reduces rebuild time of system with many declarative containers. Note that this doesn't affect production systems much, becaseu those most likely already include `minimal.nix` profile. --- nixos/doc/manual/release-notes/rl-2003.xml | 8 ++++++++ nixos/modules/virtualisation/container-config.nix | 1 + 2 files changed, 9 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2003.xml b/nixos/doc/manual/release-notes/rl-2003.xml index 7791a72d263..2a38b2adbbb 100644 --- a/nixos/doc/manual/release-notes/rl-2003.xml +++ b/nixos/doc/manual/release-notes/rl-2003.xml @@ -243,6 +243,14 @@ choices (whether to perform the action as themselves with wheel permissions, or as the root user). + + + NixOS containers no longer build NixOS manual by default. This saves evaluation time, + especially if there are many declarative containers defined. Note that this is already done + when <nixos/modules/profiles/minimal.nix> module is included + in container config. + + diff --git a/nixos/modules/virtualisation/container-config.nix b/nixos/modules/virtualisation/container-config.nix index f7a37d8c9f3..6ff6bdd30c2 100644 --- a/nixos/modules/virtualisation/container-config.nix +++ b/nixos/modules/virtualisation/container-config.nix @@ -10,6 +10,7 @@ with lib; nix.optimise.automatic = mkDefault false; # the store is host managed services.udisks2.enable = mkDefault false; powerManagement.enable = mkDefault false; + documentation.nixos.enable = mkDefault false; networking.useHostResolvConf = mkDefault true;