Prerequisites:
justinstalled on your system- You’re in the dotfiles repository root directory
Quick reference
Runjust without arguments to see all available commands:
Rebuild commands
These commands rebuild your NixOS or nix-darwin system with the current configuration.switch
switch
Switch to the new system configuration immediately and make it the default for the next boot.You can pass additional arguments to the underlying rebuild command:This command automatically shows a diff of what changed between the previous and new system configurations using
lix diff.boot
boot
Make the new configuration the default for the next boot without switching to it immediately.Useful when you want to apply changes on the next reboot without disrupting your current session.
test
test
Test the new configuration by activating it in the current session, but don’t make it the default for the next boot.Perfect for testing changes before committing to them. The configuration will revert on reboot.
deploy
deploy
Deploy a configuration to a remote host via SSH.Example:This command:
- Captures the current system state on the remote host
- Deploys the new configuration
- Shows a diff of what changed
DEPLOY_SUMMARY environment variable is set, the diff output is appended to that file instead of being printed to stdout.deploy-all
deploy-all
Deploy configurations to all remote hosts in sequence.Deploys to the following hosts in order:
- minerva
- athena
- aphrodite
- skadi
- hephaestus
- isis
provision
provision
Bootstrap a new macOS system with nix-darwin.Example:This command runs the initial nix-darwin setup and removes the non-declarative Lix installation.
Package commands
Build system images and archives.iso
iso
Build an ISO installation image for a specified configuration.Example:The built ISO will be available in the
result directory.tar
tar
Build a tarball of a system configuration.Example:Creates a complete system tarball that can be deployed to containers or minimal environments.
Development commands
Tools for developing and maintaining the configuration.check
check
Check the flake for errors and evaluate all system configurations.Pass additional arguments to
nix flake check:This command uses
--option allow-import-from-derivation false to prevent expensive IFD operations during checks.repl-host
repl-host
Open a Nix REPL with a specific host configuration loaded.Examples:Useful for inspecting configuration values and debugging.
update
update
Update flake inputs and commit the lock file.Examples:This command:
- Updates the specified inputs (or all if none specified)
- Refreshes the flake
- Creates a commit with a descriptive message
serve
serve
Build and serve the documentation site locally.Opens a local development server to preview the documentation.
push-mirrors
push-mirrors
Push the repository to all configured mirrors.Pushes to:
- GitLab (isabelroses/dotfiles)
- Codeberg (mirror)
- Tangled (mirror)
rotate-secrets
rotate-secrets
Rotate all SOPS secrets in the repository.Finds all
*.yaml files in the secrets/ directory and rotates their encryption keys using sops rotate.update-secrets
update-secrets
Update secret keys for all encrypted files.Runs
sops updatekeys on all YAML files in the secrets/ directory to ensure they’re encrypted with the current set of keys.Utility commands
System maintenance and troubleshooting utilities.verify
verify
Verify the integrity of the Nix store.Example:Checks that all store paths are valid and haven’t been corrupted.
repair
repair
Verify and repair any broken paths in the Nix store.Alias:
just fixThis is equivalent to running just verify --check-contents --repair.clean
clean
Clean up old generations and optimize the Nix store.This command:
- Deletes unused store paths older than 3 days
- Optimizes the store by deduplicating identical files
Environment variables
You can customize just command behavior using environment variables:Platform detection
The justfile automatically detects your platform (macOS vs. NixOS) and adjusts commands accordingly:- On macOS: Uses
darwin-rebuildfor system operations - On NixOS: Uses
nixos-rebuildwith sudo and reexec disabled
Some commands are platform-specific. The
provision command, for example, only works on macOS.