fix closure error
This commit is contained in:
parent
fc66316343
commit
8f7be8561b
1 changed files with 16 additions and 16 deletions
|
|
@ -14,23 +14,23 @@ in {
|
||||||
default = "http_status:404";
|
default = "http_status:404";
|
||||||
ingress = routes;
|
ingress = routes;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
systemd.services.cloudflared-dns-route = {
|
|
||||||
description = "Sync Cloudflare Tunnel DNS routes";
|
|
||||||
after = [ "network-online.target" ];
|
|
||||||
wants = [ "network-online.target" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
|
|
||||||
serviceConfig = {
|
|
||||||
RemainAfterExit = true;
|
|
||||||
Type = "oneshot";
|
|
||||||
User = "root";
|
|
||||||
};
|
|
||||||
|
|
||||||
script = lib.concatMapStringsSep "\n" (domain: ''
|
systemd.services.cloudflared-dns-route = {
|
||||||
echo "Ensuring DNS route for ${domain}..."
|
description = "Sync Cloudflare Tunnel DNS routes";
|
||||||
${pkgs.cloudflared}/bin/cloudflared tunnel --origincert /mnt/data/cloudflared/cert.pem route dns ${homelab.cf-tunnel-id} ${domain} || true
|
after = [ "network-online.target" ];
|
||||||
'') builtins.attrNames routes;
|
wants = [ "network-online.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
RemainAfterExit = true;
|
||||||
|
Type = "oneshot";
|
||||||
|
User = "root";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
script = lib.concatMapStringsSep "\n" (domain: ''
|
||||||
|
echo "Ensuring DNS route for ${domain}..."
|
||||||
|
${pkgs.cloudflared}/bin/cloudflared tunnel --origincert /mnt/data/cloudflared/cert.pem route dns ${homelab.cf-tunnel-id} ${domain} || true
|
||||||
|
'') builtins.attrNames routes;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue