1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2025-03-28 02:37:12 +00:00

perInput: Improve description

This commit is contained in:
Robert Hensing 2023-01-07 00:12:57 +01:00
parent 7930f5b1c3
commit 08ba869d7c

View file

@ -69,12 +69,26 @@ in
};
perInput = mkOption {
description = "Function from system to function from flake to `system`-specific attributes.";
description = ''
A function that pre-processes flake inputs.
It is called for users of `perSystem` such that `inputs'.''${name} = config.perInput system inputs.''${name}`.
This is used for [`inputs'`](../module-arguments.html#inputs) and [`self'`](../module-arguments.html#self).
The attributes returned by the `perInput` function definitions are merged into a single namespace (per input),
so each module should return an attribute set with usually only one or two predictable attribute names. Otherwise,
the `inputs'` namespace gets polluted.
'';
type = types.functionTo (types.functionTo (types.lazyAttrsOf types.unspecified));
};
perSystem = mkOption {
description = "A function from system to flake-like attributes omitting the `<system>` attribute.";
description = ''
A function from system to flake-like attributes omitting the `<system>` attribute.
Modules defined here have access to the suboptions and [some convenient module arguments](../module-arguments.html).
'';
type = mkPerSystemType ({ config, system, ... }: {
_file = ./perSystem.nix;
config = {