removed disk actions and updated flake

This commit is contained in:
beatzaplenty committed 2026-07-15 07:33:37 +10:00
1 parent 3ebf411bc9
commit 1f38ed3d8c
3 files changed
+217 -25

No files matched your search

+29 -12
View File
@@ -74,18 +74,35 @@ if [[ ! "$confirm" =~ ^[Yy]$ ]]; then
fi
parted -s /dev/sda -- mklabel msdos
parted -s /dev/sda -- mkpart primary 1MB -8GB
parted -s /dev/sda -- set 1 boot on
parted -s /dev/sda -- mkpart primary linux-swap -8GB 100%
mkfs.ext4 -L nixos /dev/sda1
mkswap -L swap /dev/sda2
swapon /dev/sda2
sleep 10
mount /dev/disk/by-label/nixos /mnt
mkdir -p /mnt/install-tmp
export TMPDIR=/mnt/install-tmp
nixos-install --flake "''${FLAKE_BASE_URL}#''${choice}" --no-root-password --no-write-lock-file
# parted -s /dev/sda -- mklabel msdos
# parted -s /dev/sda -- mkpart primary 1MB -8GB
# parted -s /dev/sda -- set 1 boot on
# parted -s /dev/sda -- mkpart primary linux-swap -8GB 100%
# mkfs.ext4 -L nixos /dev/sda1
# mkswap -L swap /dev/sda2
# swapon /dev/sda2
# sleep 10
# mount /dev/disk/by-label/nixos /mnt
# mkdir -p /mnt/install-tmp
# export TMPDIR=/mnt/install-tmp
# nixos-install --flake "''${FLAKE_BASE_URL}#''${choice}" --no-root-password --no-write-lock-file
if nix eval --refresh --json "''${FLAKE_BASE_URL}#nixosConfigurations.''${choice}.config.disko.devices.disk.main.device" >/dev/null 2>&1; then
disko --mode destroy,format,mount \
--flake "''${FLAKE_BASE_URL}#''${choice}"
else
echo "Selected host has no Disko configuration."
exit 1
fi
mkdir -p /mnt/install-tmp
export TMPDIR=/mnt/install-tmp
nixos-install \
--flake "''${FLAKE_BASE_URL}#''${choice}" \
--no-root-password
rm -rf /mnt/install-tmp
sleep 10
reboot