From 1598b34e590a3e94dd364bbada76a98115ffcf8a Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 11 Nov 2026 19:01:03 +0000 Subject: 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. --- lib/types/populate.nix | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'lib/types/populate.nix') 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; @@ -165,6 +169,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; @@ -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; }; }; }; -- cgit v1.3.1