diff options
| author | tv <tv@krebsco.de> | 2026-11-11 19:01:03 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-11 19:01:03 +0000 |
| commit | 1598b34e590a3e94dd364bbada76a98115ffcf8a (patch) | |
| tree | 1bf3c67b0ca648ee9794cfbf1a3dba6c5e9586fe /lib/types/populate.nix | |
| parent | 8343006ff1154be2dd9ebf862afe5caed02044c7 (diff) | |
populate: add flake-input source type
The flake-input source type delivers an input of a flake, as recorded in the
flake's lock file, and the flake source type delivers the flake itself.
fetchOnTarget belongs to flake-input, because only a locked input can be
fetched on the target.
Diffstat (limited to 'lib/types/populate.nix')
| -rw-r--r-- | lib/types/populate.nix | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/lib/types/populate.nix b/lib/types/populate.nix index b1d4151..e971fd8 100644 --- a/lib/types/populate.nix +++ b/lib/types/populate.nix @@ -39,6 +39,10 @@ default = null; type = lib.types.nullOr (lib.types.either lib.types.str source-types.flake); }; + flake-input = lib.mkOption { + default = null; + type = lib.types.nullOr source-types.flake-input; + }; git = lib.mkOption { default = null; type = lib.types.nullOr source-types.git; @@ -166,6 +170,17 @@ }; flake = lib.types.submodule { options = { + flake = lib.mkOption { + type = lib.types.str; # TODO lib.types.flake-ref + }; + inputs = lib.mkOption { + default = {}; + type = flake-inputs; + }; + }; + }; + flake-input = lib.types.submodule { + options = { fetchOnTarget = lib.mkOption { default = false; type = lib.types.bool; @@ -173,9 +188,12 @@ flake = lib.mkOption { type = lib.types.str; # TODO lib.types.flake-ref }; - input = lib.mkOption { - default = null; - type = lib.types.nullOr lib.types.str; + inputs = lib.mkOption { + default = {}; + type = flake-inputs; + }; + name = lib.mkOption { + type = lib.types.str; }; }; }; |
