fix(nginx): Propagate dnsProvider to www hosts
When we auto-created www hosts, we made an oversight by not also
propagating dnsProvider. This caused an error when using www, which we
missed because our tests also didn't check for propagation of
dnsProvider
In the meantime, we need to update our unit tests for these functions,
as by missing out dnsProvider we have effectively nailed down its
nonexistence
Finally, we also add a regression test (auxolotl-eval.check.nix), based
on the real-life example that made this fail - provided by Auxolotl's
Jake Hamilton (thanks!). That file is licensed as Auxolotl's infra is
Change-Id: I8a08a29033b9d47ca43ce87f24fe17823a6da440
Reviewed-on: https://git.clicks.codes/c/Infra/NixFiles/+/817
Tested-by: Skyler Grey <minion@clicks.codes>
Reviewed-by: Samuel Shuert <coded@clicks.codes>
diff --git a/lib/nginx/http/internal/default.nix b/lib/nginx/http/internal/default.nix
index 767bc6f..d5b679e 100644
--- a/lib/nginx/http/internal/default.nix
+++ b/lib/nginx/http/internal/default.nix
@@ -9,6 +9,7 @@
then {
"${name}" = lib.attrsets.removeAttrs host [ "www" ];
"www.${name}" = {
+ inherit (host) dnsProvider;
routes."~ ^/?([^\r\n]*)$" = lib.home-manager.hm.dag.entryAnywhere (lib.clicks.nginx.http.redirectPermanent "https://${name}/$1");
service = null;
enableHttp = host.enableHttp;