ci: add basic nix and cachix support (#15)
This commit is contained in:
parent
cc67646556
commit
53e2bc01d4
7 changed files with 86 additions and 23 deletions
11
deploy
11
deploy
|
@ -2,10 +2,17 @@
|
|||
#! nix-shell ./shell.nix -i bash
|
||||
set -euo pipefail
|
||||
|
||||
options=(
|
||||
--option extra-substituters "https://nix-community.cachix.org"
|
||||
--option binary-cache-public-keys "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
)
|
||||
|
||||
mkdir -p state
|
||||
|
||||
if [ $(nixops list --state "$NIXOPS_STATE" | grep -c "$NIXOPS_DEPLOYMENT") -eq 0 ]; then
|
||||
nixops create ./deployment.nix --deployment "$NIXOPS_DEPLOYMENT" --state "$NIXOPS_STATE"
|
||||
nixops create ./deployment.nix \
|
||||
"${options[@]}" \
|
||||
--deployment "$NIXOPS_DEPLOYMENT" --state "$NIXOPS_STATE"
|
||||
fi
|
||||
|
||||
nixops deploy "$@"
|
||||
nixops deploy "${options[@]}" "$@"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue