You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
490 B
Bash

#!/usr/bin/env bash
set -e
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR/..
echo "Building Nix environment in docker"
IMAGE=$(docker build . -q -f ./deploy/Dockerfile --platform linux/amd64)
echo "Beginning deploy"
docker run \
--name "nixos-deploy" \
--rm \
--mount type=bind,src=$(pwd)/deploy/.ssh/,dst=/root/.ssh/,readonly=true \
--mount type=volume,src=nixCache,dst=/nix/ \
--platform linux/amd64 \
-it $IMAGE \
deploy