lol

Revert "make-disk-image: replace nixos-install by nix-env calls"

This reverts commit e9bf955fd6d5ffda218878ba561c93c6a28dfe8e. We use
nixos-install to ensure that make-disk-image produces the same result
as a regular installation (9802da517fe4da41d68516029b01c5c1f175b3e4)
and to reduce code duplication. If there is something broken in
nixos-install, it should be fixed there.

+3 -11
+3 -11
nixos/lib/make-disk-image.nix
··· 180 180 export NIX_STATE_DIR=$TMPDIR/state 181 181 nix-store --load-db < ${closureInfo}/registration 182 182 183 - mkdir -m 0755 -p "$root/etc" 184 - touch "$root/etc/NIXOS" 185 - 186 - echo "copying system..." 187 - nix-env --store "$root" --substituters "auto?trusted=1" \ 188 - -p "$root/nix/var/nix/profiles/system" --set "${config.system.build.toplevel}" --quiet 189 - 190 - echo "copying channel..." 191 - mkdir -p "$root/nix/var/nix/profiles/per-user/root" 192 - nix-env --store "$root" --substituters "auto?trusted=1" \ 193 - -p "$root/nix/var/nix/profiles/per-user/root/channels" --set "${channelSources}" --quiet 183 + echo "running nixos-install..." 184 + nixos-install --root $root --no-bootloader --no-root-passwd \ 185 + --system ${config.system.build.toplevel} --channel ${channelSources} --substituters "" 194 186 195 187 echo "copying staging root to image..." 196 188 cptofs -p ${optionalString (partitionTableType != "none") "-P ${rootPartition}"} -t ${fsType} -i $diskImage $root/* /