Fix traefik routes functions

main
kalle 2025-02-03 17:05:55 +01:00
parent 35bfc55356
commit a900c1931f
2 changed files with 8 additions and 6 deletions

View File

@ -6,15 +6,18 @@
traefikRoutes =
{
hostname,
config,
host,
...
}:
let
hostname = host.hostname;
config = host.config.sonarr;
in
[
{
name = "${hostname}-sonarr";
rule = "Host(`${config.sonarr.domain}`)";
target = "http://${config.ip}:8989";
rule = "Host(`${config.domain}`)";
target = "http://${host.ip}:8989";
}
];

View File

@ -29,8 +29,7 @@
concatMap (
role:
role.traefikRoutes {
inherit hostname;
config = hosts.${hostname}.config;
host = hosts.${hostname};
}
) hosts.${hostname}.roles
) (builtins.attrNames hosts);