allowed (non-nix) home assistant to be acessed from outside.

This commit is contained in:
Gabe Venberg 2025-06-20 15:49:07 +02:00
parent 50ff7398bd
commit 6b12a84671
4 changed files with 32 additions and 9 deletions

View file

@ -88,6 +88,14 @@ in {
description = "Pictures"; description = "Pictures";
}; };
} }
{
HomeAssistant = {
icon = "sh-home-assistant.svg";
href = "https://home.venberg.xyz";
siteMonitor = "https://home.venberg.xyz";
description = "Home Automation";
};
}
{ {
Grocy = { Grocy = {
icon = "sh-grocy.svg"; icon = "sh-grocy.svg";
@ -116,13 +124,6 @@ in {
} }
{ {
Internal = [ Internal = [
{
HomeAssistant = {
icon = "sh-home-assistant.svg";
href = "http://homeassistant.local:8123/";
description = "Home Automation";
};
}
{ {
FritzBox = { FritzBox = {
icon = "sh-fritz.svg"; icon = "sh-fritz.svg";
@ -133,7 +134,7 @@ in {
{ {
AdGuardHome = { AdGuardHome = {
icon = "sh-adguard-home.svg"; icon = "sh-adguard-home.svg";
href = "http://10.10.0.2"; href = "http://10.10.0.2:8080";
description = "Home Automation"; description = "Home Automation";
}; };
} }

View file

@ -10,7 +10,7 @@
mutableSettings = true; mutableSettings = true;
allowDHCP = true; allowDHCP = true;
openFirewall=true; openFirewall=true;
port=80; port=8080;
}; };
networking.firewall.allowedUDPPorts=[53 67 546 547]; networking.firewall.allowedUDPPorts=[53 67 546 547];
} }

View file

@ -12,6 +12,7 @@ inputs.nixpkgs.lib.nixosSystem {
./disk-config.nix ./disk-config.nix
./hardware-config.nix ./hardware-config.nix
./adguard.nix ./adguard.nix
./nginx.nix
../../configs/nixos/common.nix ../../configs/nixos/common.nix
../../configs/nixos/sshd.nix ../../configs/nixos/sshd.nix
../../configs/nixos/secrets.nix ../../configs/nixos/secrets.nix

View file

@ -0,0 +1,21 @@
{
inputs,
config,
pkgs,
lib,
...
}: {
imports = [
../../configs/nixos/nginx.nix
];
# For non-nix home assistant.
services.nginx.virtualHosts."home.venberg.xyz" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://10.10.0.3:8123";
proxyWebsockets = true;
};
};
}