Use the compressed image

Apparently the script compresses the image anyway so why waste the CPU cycles
to uncompress it right afterwards.
This commit is contained in:
Andreas Zweili 2022-12-06 23:12:35 +01:00
parent 1bb7c2fb34
commit 424c6ab2eb
1 changed files with 2 additions and 4 deletions

View File

@ -1,11 +1,9 @@
#!/usr/bin/env bash
host=$1
image=~/Downloads/$host.img
image=~/Downloads/$host.img.zst
cd ~/.nixos/
nix build .#images.$host &&
unzstd result/sd-image/*.img.zst -o $image
touch $image
chmod 644 $image
cp result/sd-image/*.img.zst $image