diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6b86d4d --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +default: fantasy + +serverId := 45474 + + +deploy upload-iso: target := root@ni.i +format mount install: target := root@188.68.36.196 +populate: target ?= root@ni.i + +deploy install upload-iso: populate + +deploy: + ssh "$(target)" nixos-rebuild switch -I /root/config + +install: + ssh "$(target)" env NIXOS_CONFIG=/root/config/nixos-config \ + nixos-install -I /root/config + +format mount upload-iso: populate + ssh "$(target)" ni-$@ + +populate: + rsync -Flprtvz --delete-excluded keys/ $(target):/root/keys + rsync -Flprtvz --delete-excluded ./ $(target):/root/config/nixos-config + rsync -Flprtvz --delete-excluded ~/stockholm/ $(target):/root/config/stockholm + rsync -Flprtvz --delete-excluded --exclude /.git /var/src/nixpkgs/ $(target):/root/config/nixpkgs + +kvm-info: + umask 0077; vcp kvmInformation $(serverId) > keys/kvm-info.json + jq -r '.ftp | "machine \(.host) login \(.user) password \(.pass)"' \ + < keys/kvm-info.json \ + > keys/upload-iso.netrc |