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