summary refs log tree commit diff
path: root/nixos/maintainers
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2022-03-08 09:24:33 -0500
committerGraham Christensen <graham@grahamc.com>2022-04-07 15:28:28 -0400
commit9e3dab7d2e2f7e08baa65dfec78e27343608bdbd (patch)
treea449b0eb6e3fc2be65cfc54c81fbdc825c3a6c5c /nixos/maintainers
parent0a086bf7bf88d617f0cb126f8119e9e57b77af45 (diff)
downloadnixpkgs-9e3dab7d2e2f7e08baa65dfec78e27343608bdbd.tar
nixpkgs-9e3dab7d2e2f7e08baa65dfec78e27343608bdbd.tar.gz
nixpkgs-9e3dab7d2e2f7e08baa65dfec78e27343608bdbd.tar.bz2
nixpkgs-9e3dab7d2e2f7e08baa65dfec78e27343608bdbd.tar.lz
nixpkgs-9e3dab7d2e2f7e08baa65dfec78e27343608bdbd.tar.xz
nixpkgs-9e3dab7d2e2f7e08baa65dfec78e27343608bdbd.tar.zst
nixpkgs-9e3dab7d2e2f7e08baa65dfec78e27343608bdbd.zip
openstack-image-zfs: build a single-image ZFS root
Diffstat (limited to 'nixos/maintainers')
-rw-r--r--nixos/maintainers/scripts/openstack/openstack-image-zfs.nix17
1 files changed, 1 insertions, 16 deletions
diff --git a/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix b/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix
index 714b24a9e04..b18b3265283 100644
--- a/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix
+++ b/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix
@@ -48,15 +48,7 @@ in
       };
     };
 
-    system.build.openstackImage' = import ../../../lib/make-disk-image.nix {
-      inherit lib config copyChannel;
-      additionalSpace = "1024M";
-      pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
-      format = "qcow2";
-
-    };
-
-    system.build.openstackImage = import ../../../lib/make-zfs-image.nix {
+    system.build.openstackImage = import ../../../lib/make-single-disk-zfs-image.nix {
       inherit lib config;
       inherit (cfg) contents format name;
       pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
@@ -84,28 +76,21 @@ in
          extension=''${rootDiskImage##*.}
          friendlyName=$out/${cfg.name}
          rootDisk="$friendlyName.root.$extension"
-         bootDisk="$friendlyName.boot.$extension"
          mv "$rootDiskImage" "$rootDisk"
-         mv "$bootDiskImage" "$bootDisk"
 
          mkdir -p $out/nix-support
-         echo "file ${cfg.format} $bootDisk" >> $out/nix-support/hydra-build-products
          echo "file ${cfg.format} $rootDisk" >> $out/nix-support/hydra-build-products
 
         ${pkgs.jq}/bin/jq -n \
           --arg system_label ${lib.escapeShellArg config.system.nixos.label} \
           --arg system ${lib.escapeShellArg pkgs.stdenv.hostPlatform.system} \
           --arg root_logical_bytes "$(${pkgs.qemu}/bin/qemu-img info --output json "$rootDisk" | ${pkgs.jq}/bin/jq '."virtual-size"')" \
-          --arg boot_logical_bytes "$(${pkgs.qemu}/bin/qemu-img info --output json "$bootDisk" | ${pkgs.jq}/bin/jq '."virtual-size"')" \
           --arg boot_mode "${imageBootMode}" \
           --arg root "$rootDisk" \
-          --arg boot "$bootDisk" \
          '{}
            | .label = $system_label
            | .boot_mode = $boot_mode
            | .system = $system
-           | .disks.boot.logical_bytes = $boot_logical_bytes
-           | .disks.boot.file = $boot
            | .disks.root.logical_bytes = $root_logical_bytes
            | .disks.root.file = $root
            ' > $out/nix-support/image-info.json