summaryrefslogtreecommitdiffstats
path: root/lass/1systems/hilum/flash-stick.sh
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2023-07-25 20:39:35 +0200
committertv <tv@krebsco.de>2023-07-25 20:39:35 +0200
commit5d1b0675cf179f863a5b34b67661a953197b6057 (patch)
treedd9c83dff894fd97cee61dd1b2df3eaeecbbd740 /lass/1systems/hilum/flash-stick.sh
parenta2c9ad05b2e8237b915a100e1e38ca0f3d18526c (diff)
parent8eab63eaa81717391269a61355cb7fb64341fd1a (diff)
Merge remote-tracking branch 'orange/master'
Diffstat (limited to 'lass/1systems/hilum/flash-stick.sh')
-rwxr-xr-xlass/1systems/hilum/flash-stick.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/lass/1systems/hilum/flash-stick.sh b/lass/1systems/hilum/flash-stick.sh
index 17a5fc58..9846ea08 100755
--- a/lass/1systems/hilum/flash-stick.sh
+++ b/lass/1systems/hilum/flash-stick.sh
@@ -3,9 +3,13 @@ set -efux
disk=$1
+cd "$(dirname "$0")"
export NIXPKGS_ALLOW_UNFREE=1
(umask 077; pass show admin/hilum/luks > /tmp/hilum.luks)
trap 'rm -f /tmp/hilum.luks' EXIT
+echo "$disk" > /tmp/hilum-disk
+trap 'rm -f /tmp/hilum-disk' EXIT
+
stockholm_root=$(git rev-parse --show-toplevel)
ssh root@localhost -t -- $(nix-build \
--no-out-link \
@@ -31,7 +35,9 @@ $(nix-build \
--arg force true
)
ssh root@localhost << SSH
-NIXOS_CONFIG=/mnt/hilum/var/src/nixos-config nixos-install --no-root-password --root /mnt/hilum -I /var/src
+set -efux
+mkdir -p /mnt/hilum/etc
+NIXOS_CONFIG=/mnt/hilum/var/src/nixos-config nixos-install --no-bootloader --no-root-password --root /mnt/hilum -I /var/src
nixos-enter --root /mnt/hilum -- nixos-rebuild -I /var/src switch --install-bootloader
umount -Rv /mnt/hilum
SSH