Skip to content

Justfile Recipes

This reference documents all justfile recipes available in the infra repository. Run just --list to see available recipes or just help for usage information.

GroupCountPurpose
activation4System/home configuration activation
nix15Core nix operations
terraform3Terraform/terranix infrastructure
clan7Machine building and testing
docs18Documentation site management
diagrams3Typst diagram compilation
containers7Container image building
secrets14SOPS secrets management
sops8SOPS key management
CI/CD25CI/CD operations and caching
nix-home-manager4Home-manager bootstrap
nix-darwin3Darwin bootstrap
nixos4NixOS operations

Unified activation commands using nh via flake apps. All recipes accept nh flags: --dry (preview), --ask (confirm), --verbose.

RecipeArgumentsDescriptionCI-tested
activate*FLAGSAuto-detect platform and activate current machineNo
activate-darwinhostname *FLAGSActivate darwin configurationNo
activate-oshostname *FLAGSActivate NixOS configurationNo
activate-homeusername *FLAGSActivate home-manager configurationNo

Examples:

Terminal window
# Preview changes before applying
just activate --dry
# Apply with confirmation prompt
just activate --ask
# Activate specific darwin host
just activate-darwin stibnite
# Activate home-manager for user
just activate-home crs58 --dry

Core nix operations for building, checking, and managing the flake.

RecipeArgumentsDescriptionCI-tested
flake-info-Print nix flake inputs and outputsNo
lint-Lint nix files with pre-commitNo
dev-Manually enter dev shellNo
clean-Remove build output link (no garbage collection)No
buildprofileBuild nix flake (runs lint and check first)No
debug-buildpackageBuild experimental debug package with nomNo
debug-list-List all available debug packagesNo
check-Run nix flake check (full, including VM tests)No
check-fastnom? push? system? remote?Build checks.<system> via nix-fast-build, skipping cached derivations; a non-native system runs on remote (magnetite default, or pyrite)No
verify-Verify system configuration builds after updatesNo
bisect-nixpkgs-Bisect nixpkgs commits (automatic mode)No
bisect-nixpkgs-manualcommandBisect nixpkgs commits (manual mode)No
bootstrap-shell-Shell with bootstrap dependenciesNo
update-Update all nix flake inputsNo
update-packagepackageUpdate a package using its updateScriptNo

CI: nixbot builds checks.x86_64-linux, and checks.aarch64-darwin best-effort, directly rather than calling these recipes; just check-fast auto off x86_64-linux builds the same x86_64-linux set, and just check-fast on a Mac builds the darwin set. A failed darwin check is an ignored failure in CI, because nixbot cannot tell an absent Mac from a genuine regression, so local just check-fast on a Mac remains the gate for darwin.

check-fast: parameters are positional (nom push system remote); nom is auto|on|off, push=on uploads built paths to niks3, and system defaults to the native system. A non-native system evaluates and builds on the remote host with --no-download --retries 2: magnetite adds --remote magnetite.zt --eval-workers 4, and pyrite adds --remote pyrite.zt --eval-workers 2 --eval-max-memory-size 2048. Any other remote value fails before evaluation with the allowed values. On both hosts nix-eval-jobs takes a host-wide evaluation lock, so a remote run that overlaps another evaluation waits and prints nix-eval-jobs: waiting for the host evaluation lock held by ... every 30 seconds.

Terraform/terranix infrastructure management for cloud resources. Recipes manage Hetzner VPS infrastructure through terranix-generated configurations.

RecipeArgumentsDescriptionCI-tested
terraform*ARGSRun terraform apply (removes stale lockfile first)No
terraform-plan*ARGSRun terraform plan onlyNo
terraform-destroy*ARGSRun terraform destroyNo

Note: These recipes remove stale .terraform.lock.hcl files to sync with nix-provided providers.

Commands for clan-based machine management.

RecipeArgumentsDescriptionCI-tested
test-Run all tests (nix flake check)No
test-quick-Build the fleet, home-export, secret-encryption and terraform validation checksNo
test-integration-Run VM integration tests (Linux only)No
build-all-Build all machine configurations using nomNo
build-machinemachineBuild a specific machine configurationNo
clan-show-Show flake outputsNo
clan-metadata-Show flake metadataNo

Documentation site management using Starlight and Cloudflare Workers.

RecipeArgumentsDescriptionCI-tested
install-Install workspace dependencies (bun install)No
docs-dev-Start documentation development serverNo
docs-build-Build the documentation siteNo
docs-preview-Preview the built documentation siteNo
docs-format-Format documentation code with BiomeNo
docs-lint-Lint documentation code with BiomeNo
docs-check-Check and fix documentation code with BiomeNo
docs-linkcheck-Validate internal and external linksNo
docs-test-Run all documentation testsNo
docs-test-unit-Run documentation unit testsNo
docs-test-e2e-Run documentation E2E testsNo
docs-test-e2e-report-Show the E2E test reportNo
docs-test-coverage-Generate documentation test coverage reportNo
docs-deploy-previewbranch?Upload a preview version aliased at b-<branch>No
docs-deploy-production-Deploy to production with wrangler deployNo
docs-deployments-List recent Cloudflare deploymentsNo
docs-tail-Tail live logs from Cloudflare WorkersNo
docs-versionslimitList recent Cloudflare versionsNo

CI: nixbot builds the docs tests as checks.<system>.package-vanixiets-docs-test-* rather than calling these recipes. docs-deploy-preview and docs-deploy-production run the same deploy-docs flake app as CI, with credentials from secrets/shared.yaml. In CI the deploy-docs onPush effect deploys production on each push to main, and the deploy-docs-preview onEvent effect uploads pull request previews.

Typst diagram compilation and optimization for documentation.

RecipeArgumentsDescriptionCI-tested
diagrams-build-Compile all typst diagrams to SVG and optimize for webNo
diagrams-compilenameCompile a single typst diagram (without optimization)No
diagrams-watch-Watch typst diagrams for changes and recompileNo

Note: diagrams-build is called as a dependency by docs-build.

Container image building and testing.

RecipeArgumentsDescriptionCI-tested
build-containercontainer arch?Build container for specified architectureNo
build-multiarchcontainerBuild container for both aarch64 and x86_64No
load-container-Load container image from result into dockerNo
load-native-Load native architecture from multi-arch buildNo
test-containerbinaryTest container by running binary with —helpNo
container-allcontainer binary arch?Complete workflow: build, load, testNo
container-all-multiarchcontainer binaryMulti-arch workflow: build both, load native, testNo

SOPS-based secrets management.

RecipeArgumentsDescriptionCI-tested
scan-secrets-Scan repository for hardcoded secrets (full history)No
scan-staged-Scan staged changes for secrets (pre-commit)No
show-Show existing secrets using sopsNo
seed-dotenv-Create empty dotenv from templateNo
export-Export unique secrets to dotenv formatNo
check-secrets-Check secrets are available in sops environmentNo
get-kubeconfig-Save KUBECONFIG to file from sopsNo
hash-encryptsource_file user?Hash-encrypt file and store in secrets directoryNo
verify-hashoriginal_file secret_fileVerify hash integrity of encrypted fileNo
edit-secretfileEdit a sops encrypted fileNo
new-secretfileCreate a new sops encrypted fileNo
get-shared-secretkeyShow specific secret value from shared secretsNo
run-with-secrets+commandRun command with all shared secrets as env varsNo
validate-secrets-Validate all sops encrypted files can be decryptedNo

SOPS key management and rotation.

RecipeArgumentsDescriptionCI-tested
sops-extract-keyskey?Extract key details from BitwardenNo
sops-update-yaml-Update .sops.yaml with keys from BitwardenNo
sops-deploy-host-keyhostDeploy host key from Bitwarden to /etc/sshNo
sops-validate-correspondences-Validate SOPS key correspondencesNo
sops-sync-keys*FLAGSRegenerate ~/.config/sops/age/keys.txtNo
sops-rotate-Full key rotation workflow (interactive)No
update-all-keys-Update keys for all encrypted filesNo
sops-load-agent-Load SOPS launchd agent (darwin only)No

CI/CD operations, caching, and release management.

RecipeArgumentsDescriptionCI-tested
ci-run-watchworkflow?Trigger a GitHub Actions workflow and wait for resultNo
ci-statusworkflow?View latest workflow run statusNo
ci-logsworkflow?View latest workflow run logsNo
ci-logs-failedworkflow?View only failed logs from latest workflow runNo
ci-validateworkflow? run_id?Validate latest workflow run comprehensivelyNo
ci-debug-jobworkflow? job_name?Debug specific failed jobNo
update-flake-inputs-Trigger an ad hoc flake input update on mainNo
ghsecretsrepo?Update GitHub secrets from sopsNo
list-workflows-List available workflows (via act)No
test-flake-workflow-Execute a workflow locally via actNo
ratchet-pin-Pin GitHub Actions workflow versions to hashesNo
ratchet-unpin-Unpin workflow versions to semantic valuesNo
ratchet-update-Update GitHub Actions to latest versionsNo
ratchet-upgrade-Upgrade GitHub Actions across major versionsNo
test-cachix-Test cachix push/pull with simple derivationNo
cache-darwin-system-Build darwin system and push to cachixNo
list-packages-List all packages in packages/ directoryNo
list-packages-json*ARGSList, as JSON, the packages whose package.json declares a release configurationNo
validate-packagepackageValidate package structureNo
test-packagepackageTest package (install, tests, build)No
release*argsRun the release flake app with passthrough argumentsNo
release-packagepackage dry_run?Release a package with semantic-release; true runs --dry-runNo
renovatedry_run?Preview renovate’s decisions (dry run by default)No

CI: releases run only in the release-packages effect on pushes to main, which calls the release flake app directly. Preview a release locally with just release-package docs true: semantic-release’s --dry-run with the production plugins, so GITHUB_TOKEN is required.

Home-manager bootstrap recipes for initial setup.

RecipeArgumentsDescriptionCI-tested
home-manager-bootstrap-buildprofile?Bootstrap build home-manager (before installed)No
home-manager-bootstrap-switchprofile?Bootstrap switch home-manager (before installed)No
home-manager-buildprofile?Build home-manager with flakeNo
home-manager-switchprofile?Switch home-manager with flakeNo

Note: Use activate-home for normal operations. These recipes are for bootstrap scenarios before home-manager is installed.

Darwin bootstrap recipes for initial setup.

RecipeArgumentsDescriptionCI-tested
darwin-bootstrapprofile?Bootstrap nix-darwin with flakeNo
darwin-buildprofile?Build darwin from flakeNo
darwin-testprofile?Test darwin from flakeNo

Note: Use activate-darwin for normal operations. These recipes are for bootstrap scenarios before nix-darwin is installed.

NixOS operations and bootstrap.

RecipeArgumentsDescriptionCI-tested
nixos-bootstrapdestination username publickeyBootstrap NixOS (physical partitioning)No
nixos-vm-syncuser destinationCopy flake to VM via rsyncNo
nixos-buildprofile?Build NixOS from flakeNo
nixos-testprofile?Test NixOS from flakeNo

Warning: nixos-bootstrap performs destructive disk operations. Only use for initial physical machine setup.

Note: Use activate-os for normal NixOS activation.