refactor(dotfiles): split registry responsibilities

This commit was merged in pull request #110.
This commit is contained in:
2026-09-27 23:31:44 -04:00
parent 0e5731145e
commit 5af563d70f
10 changed files with 242 additions and 201 deletions

View File

@@ -1,10 +1,10 @@
{ lib, ... }:
{ lib, util, ... }:
{
type = lib.types.str;
checks = [
{
assertion = lib.registry.predicates.uniqueValue (entry: entry.value);
assertion = util.registry.predicates.uniqueValue (entry: entry.value);
message = "Address registry values must be unique.";
}
];

View File

@@ -1,14 +1,14 @@
{ lib, ... }:
{ lib, util, ... }:
{
checks = [
{
assertion = lib.registry.predicates.uniqueValue (entry: entry.value.domain);
assertion = util.registry.predicates.uniqueValue (entry: entry.value.domain);
message = "Route domains must be unique.";
}
{
assertion =
entries:
lib.registry.predicates.uniqueValue (entry: entry.value) (
util.registry.predicates.uniqueValue (entry: entry.value) (
lib.concatMap (entry: map (port: entry // { value = port; }) entry.value.udp.ports) entries
);
message = "Route UDP ports must be unique.";