aboutsummaryrefslogblamecommitdiff
path: root/nixops/scripts/push_deployment
blob: 067b665522a7f1c1f2881d83e75cab6d5383ed4d (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                                                     



                                                                                      


                                                                       

                                                                                     
 
                                                                                  
#!/bin/bash

DeploymentUuid="cef694f3-081d-11e9-b31f-0242ec186adf"
if [ -z "$NIXOPS_CONFIG_PASS_SUBTREE_PATH" ]; then
  echo "Please set NIXOPS_CONFIG_PASS_SUBTREE_PATH to the password-store subtree path"
  exit 1;
fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops"
export NIXOPS_DEPLOYMENT="$DeploymentUuid"
source $(dirname $(dirname $DIR))/nix_path_env
nixops="$(nix-build --no-out-link -A nixops "$(dirname $(dirname $DIR))")/bin/nixops"

$nixops export | pass insert -m $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/Deployment