1
0
Fork 0

update mkiso.sh to build with nom and hash ISO

This commit is contained in:
Pratham Patel 2024-03-01 15:36:43 +05:30
parent 9914fe86ca
commit 4f398176b6
Signed by: thefossguy
SSH Key Fingerprint: SHA256:/B3wAg7jnMEBQ2JwkebbS/eXVZANDmqRfnd9QkIhxMI
1 changed files with 11 additions and 1 deletions

View File

@ -1,4 +1,14 @@
#!/usr/bin/env nix-shell
#!nix-shell -i dash --packages dash nix nix-output-monitor
nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=iso.nix --log-format internal-json -v 2>&1 | nom --json
set -xeu
nom build .
for resultISO in $(basename result/iso/nixos-*-"$(uname -m)"-linux.iso); do
cp result/iso/"${resultISO}" .
sha512sum "${resultISO}" | awk '{print $1}' | tee "${resultISO}.sha512"
sha256sum "${resultISO}" | awk '{print $1}' | tee "${resultISO}.sha256"
chown "${USER}:${USER}" "${resultISO}"
chmod 644 "${resultISO}"
done