summary refs log tree commit diff
path: root/modules/installer/cd-dvd/iso-image.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2009-06-09 13:27:50 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2009-06-09 13:27:50 +0000
commit803d8b646f0b41817bf3e575a326b135faf254e2 (patch)
tree64cea4fc4ae22d2d5798390a1c004ff9c8c6469f /modules/installer/cd-dvd/iso-image.nix
parent45e6fe420c7837a1389a6c2c1fcb99896666f41a (diff)
downloadnixpkgs-803d8b646f0b41817bf3e575a326b135faf254e2.tar
nixpkgs-803d8b646f0b41817bf3e575a326b135faf254e2.tar.gz
nixpkgs-803d8b646f0b41817bf3e575a326b135faf254e2.tar.bz2
nixpkgs-803d8b646f0b41817bf3e575a326b135faf254e2.tar.lz
nixpkgs-803d8b646f0b41817bf3e575a326b135faf254e2.tar.xz
nixpkgs-803d8b646f0b41817bf3e575a326b135faf254e2.tar.zst
nixpkgs-803d8b646f0b41817bf3e575a326b135faf254e2.zip
* Option isoImage.storeContents to add extra paths to the Nix store on
  the CD.

svn path=/nixos/branches/modular-nixos/; revision=15906
Diffstat (limited to 'modules/installer/cd-dvd/iso-image.nix')
-rw-r--r--modules/installer/cd-dvd/iso-image.nix39
1 files changed, 26 insertions, 13 deletions
diff --git a/modules/installer/cd-dvd/iso-image.nix b/modules/installer/cd-dvd/iso-image.nix
index cec42c24933..65abf4c18c4 100644
--- a/modules/installer/cd-dvd/iso-image.nix
+++ b/modules/installer/cd-dvd/iso-image.nix
@@ -15,8 +15,20 @@ let
           }
         ];
       description = ''
-        This option lists files that have to be copied to fixed
-        locations in the generated ISO image.
+        This option lists files to be copied to fixed locations in the
+        generated ISO image.
+      '';
+    };
+
+    isoImage.storeContents = pkgs.lib.mkOption {
+      example =
+        [ { object = pkgs.stdenv;
+            symlink = "/stdenv";
+          }
+        ];
+      description = ''
+        This option lists additional derivations to be included in the
+        Nix store in the generated ISO image.
       '';
     };
 
@@ -77,6 +89,17 @@ in
       }
     ];
 
+  # Closures to be copied to the Nix store on the CD, namely the init
+  # script and the top-level system configuration directory.
+  isoImage.storeContents =
+    [ { object = config.system.build.bootStage2;
+        symlink = "/init";
+      }
+      { object = config.system.build.system;
+        symlink = "/system";
+      }
+    ];
+
   # The Grub menu.
   boot.extraGrubEntries =
     ''
@@ -101,18 +124,8 @@ in
 
     volumeID = cdLabel;
 
-    # Single files to be copied to fixed locations on the CD.
     contents = config.isoImage.contents;
-
-    # Closures to be copied to the Nix store on the CD.
-    storeContents =
-      [ { object = config.system.build.bootStage2;
-          symlink = "/init";
-        }
-        { object = config.system.build.system;
-          symlink = "/system";
-        }
-      ];
+    storeContents = config.isoImage.storeContents;
   };
 
   # After booting, register the contents of the Nix store on the CD in