diff options
Diffstat (limited to '')
-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 |