Skip to content

Just Commands

The commands below are all run with just 🡕.

Usage
just <command> <arguments>

Each command is prefixed with an icon indicating its context:

  • 💠 Shared: available both in the project and the framework.
  • 🔆 Framework: specific to the upstream DNF framework (dnf/).
  • ✳️ Project: specific to the consuming project (my network).

These commands work on all repositories of the project (by default src/*/, dnf, doc, and the root). The short alias is g.

Run any git command on one or all projects.

Fenêtre de terminal
just git "log --oneline -5" # last commits of all projects
just git "status" dnf # git status on dnf/ only
just git "remote -v" # remotes of all projects

add -A + commit -m on one or all projects. If the message is identical to the last commit, the recipe amends instead of creating a new commit.

Fenêtre de terminal
just commit "fix(net): update dns config"
just commit "fix(net): update dns config" dnf # dnf/ only

Adds current changes to the last commit (--no-edit, --allow-empty).

Fenêtre de terminal
just amend

Shows the git status of one or all projects.

Fenêtre de terminal
just status

Shows the git diff of one or all projects.

Fenêtre de terminal
just diff

Checks for an upstream branch and ahead commits before pushing.

Fenêtre de terminal
just push

Pulls the latest changes from one or all projects.

Fenêtre de terminal
just pull

Shows the last commit message of all projects, formatted and aligned.

Fenêtre de terminal
just git-last-log

Shows the list of repositories that git commands iterate over.

Fenêtre de terminal
just git-show-repos

Updates flake inputs of dnf/ then the root. If the last commit of dnf/ is already an update(flake):, it amends it.

Fenêtre de terminal
just update-flake

Syncs flake.lock with the local HEAD of dnf/ (co-development).

Fenêtre de terminal
just update-dnf

These commands help maintain the code, generate declarative files and work on the Rust generator.

Runs nix develop -c zsh to get a shell with the project tools.

Fenêtre de terminal
just develop

Runs the full chain: fixcheckgenerateformat_fix_fs_permissions.

Fenêtre de terminal
just clean

Runs treefmt on all files with the framework’s shared config.

Fenêtre de terminal
just format

Automatically fixes issues detected by statix.

Fenêtre de terminal
just fix

Regenerates the default.nix files in module folders and the var/generated/*.nix files from etc/config.yaml.

Fenêtre de terminal
just generate

Builds the generator binary (src/generator/).

Fenêtre de terminal
just gen-build

Runs the generator unit tests.

Fenêtre de terminal
just gen-test

Chains cleanamendapply-local (or apply-verbose <host>).

Fenêtre de terminal
just cat # applies locally
just cat myserver # applies on myserver

Run these checks before deploying to catch regressions.

Runs deadnix recursively on all *.nix files.

Fenêtre de terminal
just check

Runs nix flake check filtering out known warnings from DNF non-standard outputs (colmena, colmenaHive, homeManagerModules, libTests).

Fenêtre de terminal
just check-flake

Static analysis of Nix code with statix.

Fenêtre de terminal
just check-statix

Runs DNF unit tests, DNF flake check and network flake check.

Fenêtre de terminal
just check-all

Runs nix-unit on .#libTests.

Fenêtre de terminal
just unit-tests

Runs NixOS test scenarios (NixOS Test Driver).

ArgumentEffect
(empty)Lists available scenarios
allRuns all scenarios (nix flake check)
fullRegenerates fixtures then runs everything
<name>Runs a named scenario
Fenêtre de terminal
just simulate # list
just simulate all # run all
just simulate modules-node-console-git

Runs the interactive driver of a scenario (Python REPL).

Fenêtre de terminal
just simulate-debug modules-node-console-git

Manages test fixtures: generation, drift check, regeneration of keys and disposable secrets.

ActionEffect
generateRegenerates var/generated/ for all test spaces
checkChecks for drift without modifying the tree
gen-secretsRegenerates test keys and secrets (disposable)
Fenêtre de terminal
just fixtures check

Installing a new host follows a precise sequence.

Formats disks via disko and installs NixOS via nixos-anywhere.

Fenêtre de terminal
just install myserver
just install myserver nixos 10.0.0.5 # custom IP
just install myserver do=test # VM test only

✳️ full-install <host> [user] [ip]

Section titled “✳️ full-install <host> [user] [ip] ⭐”

Full chain: install + wait reboot + configure + apply + gc + reboot.

Fenêtre de terminal
just full-install myserver

Formats a USB device with disko and installs NixOS on it.

Fenêtre de terminal
just install-key myusbhost

Runs copy-idcopy-hwpush-key.

Fenêtre de terminal
just configure myserver

Copies the nix user’s public key to the target host.

Fenêtre de terminal
just copy-id myserver

Runs nixos-generate-config --show-hardware-config remotely and saves the result into usr/machines/<host>/hardware-configuration.nix.

Fenêtre de terminal
just copy-hw myserver

Transfers the age key /etc/sops/age/infra.key to the target host.

Fenêtre de terminal
just push-key myserver

Configures the administration machine: SSH keys, SOPS age keys, .sops.yaml, default secrets, Harmonia signing key.

Fenêtre de terminal
just configure-admin-host

Builds the framework ISO image for the given architecture.

Fenêtre de terminal
just build-iso # x86_64-linux (default)
just build-iso "aarch64-linux"

The deployment tool is colmena 🡕. All apply commands first refresh the DNF lock via update-dnf.

Deploys the configuration to one or more targets.

ParameterDescription
targetHostname, pattern ('*'), list (a,b), colmena tag (@server)
actionswitch (default), boot, test, build
Fenêtre de terminal
just apply @all # all hosts
just apply myserver # switch (default)
just apply myserver boot # boot
just apply 'db-*' # all hosts starting with db-

Same as apply with --verbose --show-trace.

Fenêtre de terminal
just apply-verbose myserver

Applies the configuration on the current machine.

Fenêtre de terminal
just apply-local

Enables Alertmanager maintenance mode before applying, disables it after.

Fenêtre de terminal
just apply-silenced myserver

These commands interact with fleet hosts: maintenance, reboot, cleanup, and boot repair.

Opens an interactive SSH session as nix@<host>.

Fenêtre de terminal
just enter myserver

Reboots the host via colmena exec.

Fenêtre de terminal
just reboot myserver
just reboot 'web-*' # all web-*

Halts (poweroff) the host via colmena exec.

Fenêtre de terminal
just halt myserver

Runs nix-collect-garbage -d then switch-to-configuration boot on the host.

Fenêtre de terminal
just gc myserver

Reinstalls the bootloader with NIXOS_INSTALL_BOOTLOADER=1.

Fenêtre de terminal
just fix-boot myserver

Removes .zshrc.bkp on the target host.

Fenêtre de terminal
just fix-zsh myserver

Passwords and keys are encrypted with SOPS. These commands manage them without manipulating encrypted files by hand.

Opens usr/secrets/secrets.yaml in vim (as user nix).

Fenêtre de terminal
just sops

Sets the default password for DNF workstations (SOPS-encrypted, bcrypt-hashed).

Fenêtre de terminal
just passwd-default

Updates the password for a specific user.

Fenêtre de terminal
just passwd darkone

Generates a REST password per host and a repository password per zone.

Fenêtre de terminal
just passwd-restic

Rotation of the age key /etc/sops/age/infra.key in 3 steps with integrity checks.

StepAction
initGenerates a new key, keeps the old one, re-encrypts secrets
push-keysPushes the combined key (new + old) to all hosts
finalizeVerifies all hosts have the new key, removes the old one
Fenêtre de terminal
just rotate init
just rotate push-keys
just rotate finalize

These commands cover specific features: provisioning the Matrix alert bot and managing Kanidm replication.

Creates or refreshes the Matrix bot, the webhook secret and the alert and incident rooms from the network.matrix section of config.yaml.

Fenêtre de terminal
just configure-alert-bot

Collects Kanidm replication certificates from all fleet nodes into usr/secrets/replication/.

Fenêtre de terminal
just idm-sync-certs

Analyzes the health of Kanidm replication without modifying anything. Takes the supplier node (HCS) and the list of consumers (gateways, comma-separated).

Fenêtre de terminal
just idm-fix-replica hcs agate,gw

AliasCommand
aapply
alapply-local
avapply-verbose
cclean
ddevelop
eenter
ggit
amendgit-amend
commitgit-commit
diffgit-diff
pullgit-pull
pushgit-push
statusgit-status