- Name the argset that’s passed to the
outputs
functon of the consumer flake. Usually people call itinputs
but the name doesn’t matter as long as you’re consistent.
outputs =
inputs @ {
- Pass the binding into your config via the
specialArgs
arg oflib.nixosSystem
:
nixosConfiguratios.FOO = lib.nixosSystem {
specialArgs = { inherit inputs; }
# ...
};
- Use that module arg in your config
{ pkgs, inputs, ... }:
{
services.caddy.package = inputs.caddy.packages.${pkgs.stdenv.hostPlatform.system}.default;
}
I’m not 100% familiar with caddy or its module, but that’s usually what I do for other modules.