cluster/services/forge: use forService

This commit is contained in:
Max Headroom 2024-07-23 19:05:45 +02:00
parent e9ce4095a7
commit f19b90b99f

View file

@ -19,19 +19,21 @@
ways.forge.target = let ways.forge.target = let
host = builtins.head config.services.forge.nodes.server; host = builtins.head config.services.forge.nodes.server;
in config.hostLinks.${host}.forge.url; in config.lib.forService "forge" config.hostLinks.${host}.forge.url;
garage = { garage = config.lib.forService "forge" {
keys.forgejo.locksmith.nodes = config.services.forge.nodes.server; keys.forgejo.locksmith.nodes = config.services.forge.nodes.server;
buckets.forgejo.allow.forgejo = [ "read" "write" ]; buckets.forgejo.allow.forgejo = [ "read" "write" ];
}; };
monitoring.blackbox.targets.forge = { monitoring.blackbox.targets.forge = config.lib.forService "forge" {
address = "https://forge.${depot.lib.meta.domain}/api/v1/version"; address = "https://forge.${depot.lib.meta.domain}/api/v1/version";
module = "https2xx"; module = "https2xx";
}; };
dns.records."ssh.forge".target = map dns.records = config.lib.forService "forge" {
"ssh.forge".target = map
(node: depot.hours.${node}.interfaces.primary.addrPublic) (node: depot.hours.${node}.interfaces.primary.addrPublic)
config.services.forge.nodes.server; config.services.forge.nodes.server;
};
} }