From c69d8b169f6a4bfc35a7d6906ebc062e76197528 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 27 Oct 2016 19:32:48 +0200 Subject: init --- Makefile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 -- cgit v1.2.3