cloudflared: fixed missing configuration options

This commit is contained in:
Pavel Anpin 2023-12-27 22:50:00 +01:00
parent 6df37dc6a7
commit 3ca696729b
No known key found for this signature in database
GPG Key ID: 1A1EC1EE607A8F76

View File

@ -276,9 +276,11 @@ in
ingressesSet = filterIngressSet tunnel.ingress; ingressesSet = filterIngressSet tunnel.ingress;
ingressesStr = filterIngressStr tunnel.ingress; ingressesStr = filterIngressStr tunnel.ingress;
fullConfig = { fullConfig = filterConfig {
tunnel = name; tunnel = name;
"credentials-file" = tunnel.credentialsFile; "credentials-file" = tunnel.credentialsFile;
warp-routing = filterConfig tunnel.warp-routing;
originRequest = filterConfig tunnel.originRequest;
ingress = ingress =
(map (map
(key: { (key: {
@ -294,6 +296,7 @@ in
(attrNames ingressesStr)) (attrNames ingressesStr))
++ [{ service = tunnel.default; }]; ++ [{ service = tunnel.default; }];
}; };
mkConfigFile = pkgs.writeText "cloudflared.yml" (builtins.toJSON fullConfig); mkConfigFile = pkgs.writeText "cloudflared.yml" (builtins.toJSON fullConfig);
in in
nameValuePair "cloudflared-tunnel-${name}" ({ nameValuePair "cloudflared-tunnel-${name}" ({
@ -322,5 +325,5 @@ in
}; };
}; };
meta.maintainers = with maintainers; [ bbigras ]; meta.maintainers = with maintainers; [ bbigras anpin ];
} }