mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
feat(access): mosquitto
This commit is contained in:
parent
ad185929c2
commit
0af904a9f2
3 changed files with 91 additions and 1 deletions
|
|
@ -11,7 +11,7 @@
|
|||
tei = access.nixosFor "tei";
|
||||
utsuho = access.nixosFor "utsuho";
|
||||
inherit (mediabox.services) plex;
|
||||
inherit (tei.services) home-assistant zigbee2mqtt;
|
||||
inherit (tei.services) home-assistant zigbee2mqtt mosquitto;
|
||||
inherit (utsuho.services) unifi;
|
||||
inherit (config.services) nginx;
|
||||
inherit (nginx) virtualHosts;
|
||||
|
|
@ -34,6 +34,7 @@ in {
|
|||
nixos.vouch
|
||||
nixos.access.nginx
|
||||
nixos.access.global
|
||||
nixos.access.mosquitto
|
||||
nixos.access.gensokyo
|
||||
nixos.access.keycloak
|
||||
nixos.access.vouch
|
||||
|
|
@ -88,6 +89,15 @@ in {
|
|||
(mkIf config.services.tailscale.enable access.hostnameForNetwork.tail)
|
||||
];
|
||||
};
|
||||
mosquitto = {
|
||||
inherit (nginx) group;
|
||||
domain = "mqtt.${config.networking.domain}";
|
||||
extraDomainNames = [
|
||||
"mqtt.local.${config.networking.domain}"
|
||||
"mqtt.int.${config.networking.domain}"
|
||||
(mkIf config.services.tailscale.enable "mqtt.tail.${config.networking.domain}")
|
||||
];
|
||||
};
|
||||
sso = {
|
||||
inherit (nginx) group;
|
||||
domain = virtualHosts.keycloak.serverName;
|
||||
|
|
@ -206,6 +216,9 @@ in {
|
|||
getHostnameFor = config.lib.access.getAddress4For;
|
||||
in {
|
||||
vouch.enableLocal = false;
|
||||
access.mosquitto = assert mosquitto.enable; {
|
||||
host = getHostnameFor "tei" "lan";
|
||||
};
|
||||
access.plex = assert plex.enable; {
|
||||
url = "http://${getHostnameFor "mediabox" "lan"}:${toString plex.port}";
|
||||
externalPort = 41324;
|
||||
|
|
@ -220,6 +233,9 @@ in {
|
|||
access.kitchencam = {
|
||||
streamPort = 41081;
|
||||
};
|
||||
stream.servers = {
|
||||
mosquitto.ssl.cert.name = "mosquitto";
|
||||
};
|
||||
virtualHosts = {
|
||||
fallback.ssl.cert.name = "hakurei";
|
||||
gensokyoZone.proxied.enable = "cloudflared";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue