diff --git a/configs/nixos/homepage.nix b/configs/nixos/homepage.nix index 80ee832..ccdebe2 100644 --- a/configs/nixos/homepage.nix +++ b/configs/nixos/homepage.nix @@ -88,6 +88,14 @@ in { description = "Pictures"; }; } + { + HomeAssistant = { + icon = "sh-home-assistant.svg"; + href = "https://home.venberg.xyz"; + siteMonitor = "https://home.venberg.xyz"; + description = "Home Automation"; + }; + } { Grocy = { icon = "sh-grocy.svg"; @@ -116,13 +124,6 @@ in { } { Internal = [ - { - HomeAssistant = { - icon = "sh-home-assistant.svg"; - href = "http://homeassistant.local:8123/"; - description = "Home Automation"; - }; - } { FritzBox = { icon = "sh-fritz.svg"; @@ -133,7 +134,7 @@ in { { AdGuardHome = { icon = "sh-adguard-home.svg"; - href = "http://10.10.0.2"; + href = "http://10.10.0.2:8080"; description = "Home Automation"; }; } diff --git a/hosts/rockhole64/adguard.nix b/hosts/rockhole64/adguard.nix index 0178236..93933c0 100644 --- a/hosts/rockhole64/adguard.nix +++ b/hosts/rockhole64/adguard.nix @@ -10,7 +10,7 @@ mutableSettings = true; allowDHCP = true; openFirewall=true; - port=80; + port=8080; }; networking.firewall.allowedUDPPorts=[53 67 546 547]; } diff --git a/hosts/rockhole64/default.nix b/hosts/rockhole64/default.nix index dc2a060..3940b3b 100644 --- a/hosts/rockhole64/default.nix +++ b/hosts/rockhole64/default.nix @@ -12,6 +12,7 @@ inputs.nixpkgs.lib.nixosSystem { ./disk-config.nix ./hardware-config.nix ./adguard.nix + ./nginx.nix ../../configs/nixos/common.nix ../../configs/nixos/sshd.nix ../../configs/nixos/secrets.nix diff --git a/hosts/rockhole64/nginx.nix b/hosts/rockhole64/nginx.nix new file mode 100644 index 0000000..e8e20c0 --- /dev/null +++ b/hosts/rockhole64/nginx.nix @@ -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; + }; + }; +}