allowed (non-nix) home assistant to be acessed from outside.
This commit is contained in:
		
							parent
							
								
									50ff7398bd
								
							
						
					
					
						commit
						6b12a84671
					
				
					 4 changed files with 32 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -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";
 | 
			
		||||
            };
 | 
			
		||||
          }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,7 @@
 | 
			
		|||
    mutableSettings = true;
 | 
			
		||||
    allowDHCP = true;
 | 
			
		||||
    openFirewall=true;
 | 
			
		||||
    port=80;
 | 
			
		||||
    port=8080;
 | 
			
		||||
  };
 | 
			
		||||
  networking.firewall.allowedUDPPorts=[53 67 546 547];
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										21
									
								
								hosts/rockhole64/nginx.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								hosts/rockhole64/nginx.nix
									
										
									
									
									
										Normal 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;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue