infrastructure/systems/tei/nixos.nix
arcnmx eb8b519394 fix(hass): nfandroidtv proxy
the service on the TV is unreliable, so proxy it with a fake success
response when offline to satisfy the home-assistant integration
2024-06-22 17:51:30 -07:00

50 lines
1,018 B
Nix

{
meta,
lib,
...
}: let
inherit (lib.modules) mkIf;
hassVouch = false;
in {
imports = let
inherit (meta) nixos;
in [
nixos.reisen-ct
nixos.sops
nixos.tailscale
nixos.cloudflared
nixos.postgres
nixos.nginx
nixos.access.home-assistant
nixos.access.zigbee2mqtt
nixos.access.grocy
nixos.access.barcodebuddy
nixos.access.nfandroidtv
nixos.home-assistant
nixos.zigbee2mqtt
nixos.syncplay
nixos.grocy
nixos.barcodebuddy
./cloudflared.nix
];
services.nginx = {
proxied.enable = true;
virtualHosts = {
zigbee2mqtt.proxied.enable = "cloudflared";
grocy.proxied.enable = "cloudflared";
barcodebuddy.proxied.enable = "cloudflared";
home-assistant = {
proxied.enable = "cloudflared";
vouch.enable = mkIf hassVouch true;
};
};
};
services.home-assistant = {
#reverseProxy.auth.enable = true;
};
sops.defaultSopsFile = ./secrets.yaml;
system.stateVersion = "23.11";
}