feat: add lib function to quickly mkOption mappings

This commit is contained in:
n3oney 2023-04-12 20:13:30 +02:00
parent e372fb1ccc
commit 475acf90cb
No known key found for this signature in database
GPG key ID: C786693DE727850E

View file

@ -24,6 +24,12 @@ in
}; };
}; };
mkMappingOption = description: default:
self.mkOption {
type = self.types.nullOr self.types.str;
inherit default description;
};
# For forward compatibility. # For forward compatibility.
literalExpression = super.literalExpression or super.literalExample; literalExpression = super.literalExpression or super.literalExample;
literalDocBook = super.literalDocBook or super.literalExample; literalDocBook = super.literalDocBook or super.literalExample;