summary refs log tree commit diff
path: root/nixos/modules/system/activation/top-level.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-06-04 10:34:48 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-06-04 11:06:44 +0200
commit7318ff0e385fde083d3bd2a0dcf0aedf88376124 (patch)
treee74e0451e6af54946d927dc9b4b44ed981bae4b1 /nixos/modules/system/activation/top-level.nix
parent6bf18533878c751c2f630d16ccfec471441e8477 (diff)
downloadnixlib-7318ff0e385fde083d3bd2a0dcf0aedf88376124.tar
nixlib-7318ff0e385fde083d3bd2a0dcf0aedf88376124.tar.gz
nixlib-7318ff0e385fde083d3bd2a0dcf0aedf88376124.tar.bz2
nixlib-7318ff0e385fde083d3bd2a0dcf0aedf88376124.tar.lz
nixlib-7318ff0e385fde083d3bd2a0dcf0aedf88376124.tar.xz
nixlib-7318ff0e385fde083d3bd2a0dcf0aedf88376124.tar.zst
nixlib-7318ff0e385fde083d3bd2a0dcf0aedf88376124.zip
Add option ‘system.extraDependencies’ for including stuff in the system closure
Mostly useful for installer tests that don't have network access. This
generalizes virtualisation.pathsInNixDB and isoImage.storeContents.
Diffstat (limited to 'nixos/modules/system/activation/top-level.nix')
-rw-r--r--nixos/modules/system/activation/top-level.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix
index d7a1e205b4d4..b19fea57f6bf 100644
--- a/nixos/modules/system/activation/top-level.nix
+++ b/nixos/modules/system/activation/top-level.nix
@@ -81,6 +81,8 @@ let
       substituteAll ${./switch-to-configuration.pl} $out/bin/switch-to-configuration
       chmod +x $out/bin/switch-to-configuration
 
+      echo -n "${toString config.system.extraDependencies}" > $out/extra-dependencies
+
       ${config.system.extraSystemBuilderCmds}
     '';
 
@@ -188,6 +190,16 @@ in
       '';
     };
 
+    system.extraDependencies = mkOption {
+      type = types.listOf types.package;
+      default = [];
+      description = ''
+        A list of packages that should be included in the system
+        closure but not otherwise made available to users. This is
+        primarily used by the installation tests.
+      '';
+    };
+
     system.replaceRuntimeDependencies = mkOption {
       default = [];
       example = lib.literalExample "[ ({ original = pkgs.openssl; replacement = pkgs.callPackage /path/to/openssl { ... }; }) ]";