diff options
author | tv <tv@krebsco.de> | 2016-10-27 19:32:48 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-10-27 19:32:48 +0200 |
commit | c69d8b169f6a4bfc35a7d6906ebc062e76197528 (patch) | |
tree | f4d048a8b6b332fb00a0f9a2d37f2d157e3b06f1 /Makefile |
initnomic/master
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 |