A collection of small command-line utilities, one directory per tool. The repository is language-agnostic: every tool is a Nix package, so whether it is built by Cargo, Go, or a Python wrapper is an implementation detail.
| Tool | Language | What it does |
|---|---|---|
ls-posts |
Rust | Reconstruct gallery-dl post URLs from a folder tree |
scripts |
Bash, Python | Desktop and shell helpers, one package per script, named after its file |
The flake is meant to be consumed as an input by another flake, usually
nixos-dotfiles:
inputs.cli-utils.url = "path:/home/hutao/Projects/cli-utils";
home.packages = [ inputs.cli-utils.packages.${pkgs.system}.default ];packages.<system>.default is a symlinkJoin of every tool, so one entry
installs all of them. Individual tools stay available as
packages.<system>.<tool>.
nix develop # cargo, rustc, clippy, rustfmt, rust-analyzer
nix build .#ls-posts # one tool
nix build # every tool (the default bundle)
nix flake check # evaluate packages, checks and shells
nix build .#checks.x86_64-linux.tmux -L # the tmux test suite
pre-commit run --all-files # what CI runsHooks are defined in flake.nix; .pre-commit-config.yaml is generated by
git-hooks.nix and is not tracked. Cargo commands for a Rust tool run from that
tool's own directory, not the repo root.
The tmux suite (tools/scripts/tmux/tests/) runs each test against its own
tmux server on a private socket, with a throwaway $HOME and XDG dirs, so it
never touches a running session, in the build sandbox or out of it. A test is
a bash script there; tests.nix runs every one.
flake.nix # packages.<system>.<tool>, devShells, checks
tools/
ls-posts/ # one directory per tool, with its own build files
scripts/ # grouped by responsibility, one default.nix for all