From c69d8b169f6a4bfc35a7d6906ebc062e76197528 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 27 Oct 2016 19:32:48 +0200 Subject: init --- local-upload-iso | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 local-upload-iso (limited to 'local-upload-iso') diff --git a/local-upload-iso b/local-upload-iso new file mode 100755 index 0000000..26c2358 --- /dev/null +++ b/local-upload-iso @@ -0,0 +1,17 @@ +#! /bin/sh +# XXX DRY, see default.nix's ni-upload-iso + +keys=$PWD/keys +nixos_config=$PWD +nixpkgs=/var/src/nixpkgs + +set -efux +isoImage=$(nix-build \ + -A config.system.build.isoImage \ + -I nixos-config="$nixos_config/install.nix" \ + --no-out-link \ + "$nixpkgs"/nixos); \ +ftpHost=$(jq -r .ftp.host "$keys/kvm-info.json"); \ +curl -n --netrc-file "$keys/upload-iso.netrc" \ + -T $isoImage/iso/ni-install.iso \ + "ftp://$ftpHost/cdrom/ni-install.iso" -- cgit v1.2.3