13 lines
508 B
Bash
Executable file
13 lines
508 B
Bash
Executable file
#!/bin/bash
|
|
contextRoot="$(mktemp -d)";
|
|
root="$contextRoot/airootfs";
|
|
rootHome="$root/root";
|
|
nixDir="$root/nix/var/nix/profiles/per-user/root/channels/nixpkgs";
|
|
profileDir="/mnt/archiso-valhalla";
|
|
mkdir -p "$rootHome";
|
|
git clone .. "$rootHome/PortValhalla";
|
|
git clone https://github.com/NixOS/nixpkgs.git --depth=1 -b nixos-24.05 "$nixDir";
|
|
rm -rf "$nixDir/.git";
|
|
sudo mount --mkdir -t overlay overlay -o lowerdir=.:"$contextRoot" "$profileDir";
|
|
sudo mkarchiso "$@" "$profileDir";
|
|
sudo umount "$profileDir";
|