Fix traefik routes functions
parent
35bfc55356
commit
a900c1931f
|
@ -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";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
@ -29,8 +29,7 @@
|
|||
concatMap (
|
||||
role:
|
||||
role.traefikRoutes {
|
||||
inherit hostname;
|
||||
config = hosts.${hostname}.config;
|
||||
host = hosts.${hostname};
|
||||
}
|
||||
) hosts.${hostname}.roles
|
||||
) (builtins.attrNames hosts);
|
||||
|
|
Loading…
Reference in New Issue