refactor(dotfiles): split registry responsibilities
This commit was merged in pull request #110.
This commit is contained in:
@@ -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.";
|
||||
}
|
||||
];
|
||||
|
||||
@@ -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.";
|
||||
|
||||
Reference in New Issue
Block a user