feat(registry): validate unique addresses and routes

This commit is contained in:
2026-08-25 22:10:09 -04:00
parent f45aa44ead
commit 959a9f98ae
4 changed files with 109 additions and 57 deletions

View File

@@ -1,4 +1,9 @@
{ lib, ... }:
{
type = lib.types.str;
validate = lib.registry.validators.uniqueValue {
value = entry: entry.value;
message = "Address registry values must be unique.";
};
}

View File

@@ -1,5 +1,10 @@
{ lib, ... }:
{
validate = lib.registry.validators.uniqueValue {
value = entry: entry.value.domain;
message = "Route domains must be unique.";
};
type = lib.types.submodule {
options = {
domain = lib.mkOption {