ingress/justfile
2024-08-21 23:00:23 +02:00

26 lines
532 B
Makefile

# Always use devbox environment to run commands.
set shell := ["devbox", "run"]
# Load dotenv
set dotenv-load
export TENV_AUTO_INSTALL := "true"
default:
@just --list
lint:
@tofu fmt -check -recursive .
@tflint --recursive
build:
@nix build .#vm
deploy:
#!/usr/bin/env sh
export NIX_RESULT_DIR=$(nix build --print-out-paths .#vm)
export IMAGE_NAME=$(ls ${NIX_RESULT_DIR} | grep ".qcow2")
export TF_VAR_image_path=${NIX_RESULT_DIR}/${IMAGE_NAME}
cd {{justfile_directory()}}/terraform
tofu init
tofu apply