summaryrefslogtreecommitdiffstats
path: root/local-upload-iso
blob: 26c2358fbe61e4804ee3b8d3e0f428f007444664 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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"