Nix Config Tools #
⚠️ DEPRECATED — These tools have been consolidated into the monorepo at ~/Developer/Git/pkgs/packages/nix-config-tools.
Please use the monorepo version instead:
nix run ~/Developer/Git/pkgs#health-check
nix run ~/Developer/Git/pkgs#flake-bump
nix run ~/Developer/Git/pkgs#gen-diff
nix run ~/Developer/Git/pkgs#server-config
Or via shell aliases (set up by home/programs/zsh.nix):
health-check # pre-rebuild preflight
flake-bump # inspect / update flake inputs
gen-diff # diff package changes between generations
Migration Details #
The source code remains here for reference, but builds should use the monorepo
flake. The nix-config flake has been updated to include the monorepo as an input
(pkgs-monorepo), allowing the tools to be built and run efficiently within a
unified workspace.
For historical reference, see the old documentation below. It remains accurate but all commands should now use the monorepo location.
nix run ~/.config/nix-config/tools#<tool>
Or via the shell aliases set up by home/programs/zsh.nix:
health-check # pre-rebuild preflight
flake-bump # inspect / update flake inputs
gen-diff # diff package changes between generations
health-check #
Pre-rebuild preflight. Run before nrs to catch problems early.
health-check
Checks:
- Nix daemon is responding
flake.lockis present and valid JSON- Flake evaluates without errors
- Git working tree is clean
- Age key exists at
~/.config/age/keys.txt - SSH keys present in
modules/ssh-keys.nix - Disk space on
/nix/store - Homebrew installed (macOS only)
- Disk space on
/nix/store - Homebrew installed (macOS only)
Exits 0 when all hard checks pass (warnings are non-fatal).
flake-bump #
Shows how stale each flake input is and bumps them selectively.
flake-bump # show staleness table
flake-bump --update nixpkgs # bump one input and commit flake.lock
flake-bump --update-all # bump everything and commit flake.lock
gen-diff #
Shows what packages changed between NixOS/nix-darwin generations.
gen-diff # diff last two generations
gen-diff --list # list all generations with dates
gen-diff --from 42 --to 43 # diff specific generation numbers
Wraps nix store diff-closures with a friendlier interface and generation listing.
Retired tools #
The following tools were removed. Their source files remain in src/bin/ for
reference but are no longer compiled.
darwin-export— macOS settings are now fully declarative insettings/darwin/default.nix— nothing to exportgnome-export— GNOME/dconf settings are now fully declarative insettings/gnome/dconf-settings.nix— nothing to exportsecrets-setup— Was a stub that only checked if~/.config/age/keys.txtexisted;health-checkcovers thiscategorize-apps—nix search/brew info --casklookups produce false positives;darwin.nixis hand-maintainedgenerate-app-config— Same reasons ascategorize-appssync-apps— Same reasons, plus it auto-mutated config files without review
Development #
Adding a new tool #
-
Create
src/bin/your-tool.rs -
Add to
Cargo.toml:[[bin]] name = "your-tool" path = "src/bin/your-tool.rs" -
Expose in
flake.nixunderapps -
Add a shell alias in
settings/config/shell.nixif used regularly
Common utilities (lib.rs) #
use tools_common::*;
let root = git_root(); // path to ~/.config/nix-config
let timestamp = get_timestamp(); // "2026-02-14 20:00:00"
let host = get_hostname(); // "macmini"
// Commit a file and push
git_sync("flake.lock", "flake");