diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-24 17:59:52 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-24 17:59:52 +0100 |
commit | 8245579c8af73c8f40f5978878c7944c814ba04f (patch) | |
tree | 006caa951e345f481be3b91b85bcfda1061956d9 /scripts/deploy.sh | |
parent | refactor(modules/impermanence): Migrate to by-name while distributing mods (diff) | |
download | nixos-server-8245579c8af73c8f40f5978878c7944c814ba04f.tar.gz nixos-server-8245579c8af73c8f40f5978878c7944c814ba04f.zip |
[WIP]
Diffstat (limited to 'scripts/deploy.sh')
-rwxr-xr-x | scripts/deploy.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100755 index 0000000..9d27e5a --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env sh + +[ "$#" -ne 2 ] && { + echo "Usage: $1 <ssh url> <host_name>" + exit 2 +} +ssh_url="$1" +host_name="$2" +root="$(git rev-parse --show-toplevel)" + +nix run github:numtide/nixos-anywhere -- \ + --flake ".#$host_name" \ + --target-host "$ssh_url" \ + --generate-hardware-config nixos-facter "$root/hardware_config_$host_name.nix" + +# vim: ft=sh |