forked from dan/liminix
liminix.types.replacable is a string or ref to an output
This commit is contained in:
parent
21f2320d86
commit
4cc82e1502
@ -30,7 +30,7 @@ in {
|
|||||||
};
|
};
|
||||||
lib = {
|
lib = {
|
||||||
types =
|
types =
|
||||||
let inherit (lib) types isDerivation;
|
let inherit (lib) mkOption types isDerivation;
|
||||||
in rec {
|
in rec {
|
||||||
service = types.package // {
|
service = types.package // {
|
||||||
name = "service";
|
name = "service";
|
||||||
@ -43,6 +43,18 @@ in {
|
|||||||
description = "parametrisable s6-rc service definition";
|
description = "parametrisable s6-rc service definition";
|
||||||
check = x: lib.isAttrs x && x ? parameters && x ? build;
|
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;
|
inherit typeChecked;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user