about summary refs log tree commit diff
path: root/justfile
diff options
context:
space:
mode:
Diffstat (limited to 'justfile')
-rw-r--r--justfile13
1 files changed, 7 insertions, 6 deletions
diff --git a/justfile b/justfile
index 49d6f1d..94877a0 100644
--- a/justfile
+++ b/justfile
@@ -1,5 +1,6 @@
 SSH_OPTIONS := "-o PubkeyAuthentication=no -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
 
+nixdisk := "vda"
 nixaddr := ""
 
 # update dependencies
@@ -33,13 +34,13 @@ vm-bootstrap:
 	#!/usr/bin/env bash
 	set -euxo pipefail
 	ssh {{SSH_OPTIONS}} root@{{nixaddr}} " \
-		parted /dev/vda -- mklabel gpt; \
-		parted /dev/vda -- mkpart primary 512MB 100%; \
-		parted /dev/vda -- mkpart ESP fat32 1MB 512MB; \
-		parted /dev/vda -- set 2 esp on; \
+		parted /dev/{{nixdisk}} -- mklabel gpt; \
+		parted /dev/{{nixdisk}} -- mkpart primary 512MB 100%; \
+		parted /dev/{{nixdisk}} -- mkpart ESP fat32 1MB 512MB; \
+		parted /dev/{{nixdisk}} -- set 2 esp on; \
 		sleep 1; \
-		mkfs.ext4 -L nixos /dev/vda1; \
-		mkfs.fat -F 32 -n boot /dev/vda2; \
+		mkfs.ext4 -L nixos /dev/{{nixdisk}}1; \
+		mkfs.fat -F 32 -n boot /dev/{{nixdisk}}2; \
 		sleep 1; \
 		mount /dev/disk/by-label/nixos /mnt; \
 		mkdir -p /mnt/boot; \