From 4dc8d8b8341e1119553156e3b26b698860da4113 Mon Sep 17 00:00:00 2001 From: Mark Nipper Date: Tue, 12 Nov 2024 15:26:37 -0800 Subject: Switch back to fully flake based remote install --- scripts/remote-install-with-disko | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/scripts/remote-install-with-disko b/scripts/remote-install-with-disko index c86f005..b0c20d2 100755 --- a/scripts/remote-install-with-disko +++ b/scripts/remote-install-with-disko @@ -1,5 +1,5 @@ #!/usr/bin/env nix -#!nix shell nixpkgs#rsync nixpkgs#zsh --command zsh +#!nix shell nixpkgs#zsh --command zsh setopt ERR_EXIT PIPE_FAIL @@ -15,7 +15,7 @@ if (( ${+opts[-x]} )); then fi DIR="${0:h}" -FLAKE="https://arrakis.bitgnome.net/nipsy/git/nix/" +FLAKE="https://arrakis.bitgnome.net/nipsy/git/nix/snapshot/nix-master.tar" HOSTNAME="${1}" TARGET="${2}" @@ -44,15 +44,11 @@ echo if [[ "${REPLY}" == "y" ]]; then - ssh root@${TARGET} rm -rf /etc/nixos - ssh root@${TARGET} git clone ${FLAKE} /etc/nixos + ssh root@${TARGET} nix run github:nix-community/disko/latest -- \ + --mode disko \ + --flake ${FLAKE}#${HOSTNAME} - ssh root@${TARGET} nix run github:nix-community/disko -- \ - --mode destroy,format,mount \ - --yes-wipe-all-disks \ - /etc/nixos/hosts/${HOSTNAME}/disks.nix - - ssh root@${TARGET} nixos-install --flake /etc/nixos#${HOSTNAME} + ssh root@${TARGET} nixos-install --flake ${FLAKE}#${HOSTNAME} if [[ "${?}" -eq 0 ]]; then echo 'Unmounting file systems...' >&2 -- cgit v1.2.3