fix(hakurei): access

This commit is contained in:
arcnmx 2024-01-20 15:33:51 -08:00
parent 7ded53ccc1
commit e95cec051f
5 changed files with 62 additions and 16 deletions

View file

@ -5,7 +5,7 @@
}:
let
inherit (lib.options) mkOption;
inherit (lib.modules) mkIf mkMerge mkDefault mkOptionDefault;
inherit (lib.modules) mkIf mkDefault mkOptionDefault;
cfg = config.services.zigbee2mqtt;
access = config.services.nginx.access.zigbee2mqtt;
proxyPass = mkDefault "http://${access.host}:${toString access.port}";
@ -51,6 +51,12 @@ in {
inherit proxyPass extraConfig;
};
};
"z2m.tail.${config.networking.domain}" = mkIf config.services.tailscale.enable {
local.enable = true;
locations."/" = {
inherit proxyPass extraConfig;
};
};
};
};
}