diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2024-11-12 15:26:37 -0800 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2024-11-12 15:26:37 -0800 |
commit | 4dc8d8b8341e1119553156e3b26b698860da4113 (patch) | |
tree | 382c84260cf586e0c33eabd863622978d5a726eb | |
parent | 8eca3c2869debffb82a880f976771b8f75d0746e (diff) | |
download | nix-4dc8d8b8341e1119553156e3b26b698860da4113.tar nix-4dc8d8b8341e1119553156e3b26b698860da4113.tar.gz nix-4dc8d8b8341e1119553156e3b26b698860da4113.tar.bz2 nix-4dc8d8b8341e1119553156e3b26b698860da4113.tar.lz nix-4dc8d8b8341e1119553156e3b26b698860da4113.tar.xz nix-4dc8d8b8341e1119553156e3b26b698860da4113.tar.zst nix-4dc8d8b8341e1119553156e3b26b698860da4113.zip |
Switch back to fully flake based remote install
-rwxr-xr-x | scripts/remote-install-with-disko | 16 |
1 files 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 |