41 lines
924 B
Nix
41 lines
924 B
Nix
{ lib }:
|
|
let
|
|
# TODO: Add full Nix evaluation to single-use binding analysis.
|
|
# NOLINT(single_use_binding)
|
|
checkType = lib.types.submodule {
|
|
options = {
|
|
assertion = lib.mkOption {
|
|
type = lib.types.functionTo lib.types.bool;
|
|
description = ''
|
|
Tests this registry's flattened collected entries.
|
|
'';
|
|
};
|
|
|
|
message = lib.mkOption {
|
|
type = lib.types.str;
|
|
description = ''
|
|
Describes the registry validation failure.
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
in
|
|
{
|
|
options = {
|
|
type = lib.mkOption {
|
|
type = lib.types.raw;
|
|
description = ''
|
|
Defines the NixOS option type for one registry entry.
|
|
'';
|
|
};
|
|
|
|
checks = lib.mkOption {
|
|
type = lib.types.listOf checkType;
|
|
default = [ ];
|
|
description = ''
|
|
Contains validation checks for this registry's flattened collected entries.
|
|
'';
|
|
};
|
|
};
|
|
}
|