helpers: add mkCompositeOptions (#223)

This commit is contained in:
Gaétan Lepage 2023-03-06 23:45:38 +01:00 committed by GitHub
parent 2c333c86d0
commit f3ec786baa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,6 +85,9 @@ with lib; rec {
mkIfNonNull = c: mkIf (!isNull c) c;
mkCompositeOptions = desc: options:
mkNullOrOption (types.submodule {inherit options;}) desc;
defaultNullOpts = rec {
mkNullable = type: default: desc:
mkNullOrOption type (