commit 4cc82e1502d644b2ce941d18fe572f68680173cb
parent 21f2320d86f6b23fdddd46c7cc2f02f58f287af4
Author: Daniel Barlow <dan@telent.net>
Date: Wed, 21 Aug 2024 00:16:14 +0100
liminix.types.replacable is a string or ref to an output
Diffstat:
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -30,7 +30,7 @@ in {
};
lib = {
types =
- let inherit (lib) types isDerivation;
+ let inherit (lib) mkOption types isDerivation;
in rec {
service = types.package // {
name = "service";
@@ -43,6 +43,18 @@ in {
description = "parametrisable s6-rc service definition";
check = x: lib.isAttrs x && x ? parameters && x ? build;
};
+ replacable = types.either
+ types.str
+ (types.submodule {
+ options = {
+ service = mkOption {
+ type = service;
+ };
+ path = mkOption {
+ type = types.str;
+ };
+ };
+ });
};
inherit typeChecked;
};