Move Forgejo NSC runtime into agenix
This commit is contained in:
parent
251922da9e
commit
48b8a3c32f
14 changed files with 217 additions and 18 deletions
34
Makefile
34
Makefile
|
|
@ -1,9 +1,43 @@
|
|||
FLAKE ?= .
|
||||
AGENIX ?= nix run ${FLAKE}\#agenix --
|
||||
|
||||
SECRETS := forgejo/nsc-token \
|
||||
forgejo/nsc-dispatcher-config \
|
||||
forgejo/nsc-autoscaler-config
|
||||
|
||||
tun := $(shell ifconfig -l | sed 's/ /\n/g' | grep utun | tail -n 1)
|
||||
cargo_console := env RUST_BACKTRACE=1 RUST_LOG=debug RUSTFLAGS='--cfg tokio_unstable' cargo run --all-features --
|
||||
cargo_norm := env RUST_BACKTRACE=1 RUST_LOG=debug cargo run --
|
||||
sudo_cargo_console := sudo -E env RUST_BACKTRACE=1 RUST_LOG=debug RUSTFLAGS='--cfg tokio_unstable' cargo run --all-features --
|
||||
sudo_cargo_norm := sudo -E env RUST_BACKTRACE=1 RUST_LOG=debug cargo run --
|
||||
|
||||
.PHONY: secret secret-file secrets-list
|
||||
|
||||
secret:
|
||||
@if [ -z "${name}" ]; then \
|
||||
printf 'Usage: make secret name=<secret-path>\nAvailable secrets:\n %s\n' "${SECRETS}"; \
|
||||
exit 1; \
|
||||
fi
|
||||
${AGENIX} -e secrets/${name}.age
|
||||
|
||||
secret-file:
|
||||
@if [ -z "${name}" ]; then \
|
||||
printf 'Usage: make secret-file name=<secret-path> file=<source-file>\nAvailable secrets:\n %s\n' "${SECRETS}"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@if [ -z "${file}" ]; then \
|
||||
printf 'Usage: make secret-file name=<secret-path> file=<source-file>\n'; \
|
||||
exit 1; \
|
||||
fi
|
||||
@if [ ! -f "${file}" ]; then \
|
||||
printf 'Source file "%s" not found.\n' "${file}"; \
|
||||
exit 1; \
|
||||
fi
|
||||
SECRET_SOURCE_FILE="${file}" EDITOR="${PWD}/Scripts/agenix-load-file.sh" ${AGENIX} -e secrets/${name}.age </dev/tty
|
||||
|
||||
secrets-list:
|
||||
@printf '%s\n' ${SECRETS}
|
||||
|
||||
check:
|
||||
@cargo check
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue