|
20 | 20 | , buildInstaller ? true
|
21 | 21 | , buildBundle ? true
|
22 | 22 | , buildDisk ? true
|
| 23 | +, buildReleaseDisk ? false |
23 | 24 | , buildLive ? true
|
24 | 25 | }:
|
25 | 26 |
|
|
31 | 32 | applicationOverlays = application.overlays;
|
32 | 33 | });
|
33 | 34 |
|
34 |
| - # lib.makeScope returns consistent set of packages that depend on each other (and is my new favorite nixpkgs trick) |
35 |
| - components = with pkgs; lib.makeScope newScope (self: with self; { |
| 35 | + # lib.makeScope returns consistent set of packages that depend on each other |
| 36 | + mkComponents = { application, extraModules ? [ ], rescueSystemOpts ? {}, diskBuildEnabled ? buildDisk }: |
| 37 | + (with pkgs; lib.makeScope newScope (self: with self; { |
36 | 38 |
|
37 | 39 | inherit updateUrl deployUrl kioskUrl;
|
38 | 40 | inherit (application) version safeProductName fullProductName;
|
|
55 | 57 | updateCert = copyPathToStore updateCert;
|
56 | 58 |
|
57 | 59 | # System image as used in full installation
|
58 |
| - systemImage = callPackage ./system-image { application = application; }; |
| 60 | + systemImage = callPackage ./system-image { |
| 61 | + application = application; |
| 62 | + extraModules = extraModules; |
| 63 | + }; |
59 | 64 |
|
60 | 65 | # USB live system
|
61 | 66 | live = callPackage ./live { application = application; };
|
|
86 | 91 | # Script for spinning up VMs
|
87 | 92 | run-in-vm = callPackage ./testing/run-in-vm {};
|
88 | 93 |
|
89 |
| - }); |
| 94 | + })); |
| 95 | + |
| 96 | + components = mkComponents { inherit application; }; |
90 | 97 |
|
| 98 | + releaseDiskComponents = mkComponents { |
| 99 | + inherit application; |
| 100 | + extraModules = [ ./testing/system/passwordless-root.nix ]; |
| 101 | + }; |
| 102 | + |
| 103 | + releaseDisk = pkgs.callPackage ./testing/disk/release.nix { |
| 104 | + inherit (releaseDiskComponents) install-playos; |
| 105 | + }; |
91 | 106 | in
|
92 | 107 |
|
93 | 108 | with pkgs; stdenv.mkDerivation {
|
@@ -115,6 +130,12 @@ with pkgs; stdenv.mkDerivation {
|
115 | 130 | + lib.optionalString buildLive ''
|
116 | 131 | ln -s ${components.live}/iso/${components.safeProductName}-live-${components.version}.iso $out/${components.safeProductName}-live-${components.version}.iso
|
117 | 132 | ''
|
| 133 | + + lib.optionalString buildDisk '' |
| 134 | + ln -s ${components.disk} $out/${components.safeProductName}-disk-${components.version}.img |
| 135 | + '' |
| 136 | + + lib.optionalString buildReleaseDisk '' |
| 137 | + ln -s ${releaseDisk} $out/${components.safeProductName}-release-disk-${components.version}.img.zst |
| 138 | + '' |
118 | 139 | # Installer ISO image
|
119 | 140 | + lib.optionalString buildInstaller ''
|
120 | 141 | ln -s ${components.installer}/iso/${components.safeProductName}-installer-${components.version}.iso $out/${components.safeProductName}-installer-${components.version}.iso
|
|
0 commit comments