2024-06-22 19:07:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
contextRoot="$(mktemp -d)";
|
2024-06-23 10:32:52 +00:00
|
|
|
root="$contextRoot/airootfs";
|
|
|
|
rootHome="$root/root";
|
|
|
|
nixDir="$root/nix/var/nix/profiles/per-user/root/channels/nixpkgs";
|
2024-06-22 19:07:44 +00:00
|
|
|
profileDir="/mnt/archiso-valhalla";
|
|
|
|
mkdir -p "$rootHome";
|
|
|
|
git clone .. "$rootHome/PortValhalla";
|
2024-06-23 10:19:59 +00:00
|
|
|
git clone https://github.com/NixOS/nixpkgs.git --depth=1 -b nixos-24.05 "$nixDir";
|
|
|
|
rm -rf "$nixDir/.git";
|
2024-06-22 19:07:44 +00:00
|
|
|
sudo mount --mkdir -t overlay overlay -o lowerdir=.:"$contextRoot" "$profileDir";
|
|
|
|
sudo mkarchiso "$@" "$profileDir";
|
|
|
|
sudo umount "$profileDir";
|