lib.types: add luaInline

Represents inline lua as expected by `lib.generators.toLua`, for
embedding raw lua expressions within structurally generated lua.
This commit is contained in:
Matt Sturgeon 2025-03-15 10:29:28 +00:00
parent 7436684102
commit c347d605c9
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
3 changed files with 19 additions and 0 deletions

View file

@ -834,6 +834,15 @@ rec {
};
};
# A value produced by `lib.mkLuaInline`
luaInline = mkOptionType {
name = "luaInline";
description = "inline lua";
descriptionClass = "noun";
check = x: x._type or null == "lua-inline";
merge = mergeEqualOption;
};
uniq = unique { message = ""; };
unique = { message }: type: mkOptionType rec {