A flake-parts module for use with flake-file. It automatically adds follows for sub-inputs that already exist at the root of your flake.
If nixpkgs is a root input and home-manager also declares nixpkgs as an input, this module will write:
home-manager.inputs.nixpkgs.follows = "nixpkgs";Import the module in one of your flake-parts files and register the input so it ends up in the generated flake.nix:
{ inputs, ... }:
{
imports = [ inputs.flake-follows.flakeModules.flake-follows ];
flake-file.inputs.flake-follows.url = "github:anders130/flake-follows";
}Run nix run .#write-flake to regenerate flake.nix with the follows applied.
Sub-inputs to skip, in "input/subInput" form.
flake-follows.exclude = [
"hyprland/nixpkgs"
"caelestia-shell/nixpkgs"
];Default: []
Runs nix flake lock after writing flake.nix to lock any new inputs, then regenerates once if the lock changed.
Default: true