helpers/types: expose isRawType

This commit is contained in:
Gaetan Lepage 2024-02-03 20:04:01 +01:00 committed by Gaétan Lepage
parent 3543c84062
commit 22b587f3dc

View file

@ -6,8 +6,6 @@
with lib; with lib;
with nixvimOptions; with nixvimOptions;
with lib.types; let with lib.types; let
isRawType = v: lib.isAttrs v && lib.hasAttr "__raw" v && lib.isString v.__raw;
strLikeType = description: strLikeType = description:
mkOptionType { mkOptionType {
name = "str"; name = "str";
@ -18,6 +16,8 @@ with lib.types; let
}; };
in in
rec { rec {
isRawType = v: lib.isAttrs v && lib.hasAttr "__raw" v && lib.isString v.__raw;
rawLua = mkOptionType { rawLua = mkOptionType {
name = "rawLua"; name = "rawLua";
description = "raw lua code"; description = "raw lua code";