nicks-nix-config/hosts/Alaska/modules/home-assistant.nix

46 lines
1 KiB
Nix
Raw Permalink Normal View History

2024-08-18 17:30:11 -07:00
{ config, lib, pkgs, ... }:
{
services.home-assistant = {
enable = true;
openFirewall = true;
# List extraComponents here to be installed. The names can be found here:
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/home-assistant/component-packages.nix
# Components listed here will be possible to add via the webUI if not
# automatically picked up.
extraComponents = [
"tasmota"
2024-08-18 20:25:35 -07:00
"history"
"history_stats"
2024-08-18 17:46:03 -07:00
"mqtt"
2024-08-18 17:30:11 -07:00
];
2024-08-18 20:25:35 -07:00
extraPackages = python3Packages:
with python3Packages; [
numpy
pyturbojpeg
# psycopg2 # uncomment for recorder postgressql support
];
2024-08-18 17:30:11 -07:00
config = {
};
};
services.nginx.virtualHosts = {
"home-assistant.nickiel.net" = {
locations."/" = {
proxyPass = "http://127.0.0.1:8123";
proxyWebsockets = true;
extraConfig = ''
allow 100.64.0.0/16;
2024-08-18 20:25:35 -07:00
allow 10.0.0.114;
allow 127.0.0.1;
deny all;
'';
};
};
};
2024-08-18 17:30:11 -07:00
}