mirror of
https://github.com/Swarsel/follow-nix.git
synced 2026-11-05 15:07:53 +01:00
A tool for optimising and fixing flake input follows
- Python 75.2%
- Nix 24.8%
| src | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
follow-nix
follow-nix is a simple tool that checks your input follows and reports two things:
- Follow candidates — inputs of your inputs that point at the same repository as one of your root inputs but are not deduplicated via
follows. - Override warnings — existing
followswhere the upstream flake declared something different from what it receives in your flake.
Usage
$ follow-nix --help
usage: follow-nix [-h] [--json] [--no-overrides] [--fail-on {never,candidates,overrides,any}] [flake]
Report flake inputs that could follow a root input, and existing follows that override an upstream pin
positional arguments:
flake path to the flake directory (default: .)
options:
-h, --help show this help message and exit
--json emit machine-readable JSON
--no-overrides skip the override check (no store/network access, candidates only)
--fail-on {never,candidates,overrides,any}
exit non-zero when findings of this kind exist (default: never)
$ follow-nix /path/to/flake # or just follow-nix in a flake dir
Follow candidates:
hydra.nixpkgs -> nixpkgs | nixpkgs-stable (upstream: NixOS/nixpkgs@nixos-25.05-small)
Override warnings:
copyparty.nixpkgs follows nixos/nixpkgs@nixos-unstable but upstream declares nixpkgs@nixos-25.05 (upstream pins ref nixos-25.05)