added homeassistant

This commit is contained in:
2024-11-24 17:32:48 -06:00
parent 56daf6efb9
commit dc488cc9e5
5 changed files with 56 additions and 16 deletions

18
flake.lock generated
View File

@@ -1210,11 +1210,11 @@
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-Hripi5dnBGegbRPwCt1+a3oH6b1AQxEoJXodiLE8KKw=", "narHash": "sha256-Hripi5dnBGegbRPwCt1+a3oH6b1AQxEoJXodiLE8KKw=",
"path": "/nix/store/5w3n8ay7qj645wm9j0ibmi4xpllbf1kx-source/home-manager", "path": "/nix/store/n40rh79zxzb143bjilqidmm3zgzi42jp-source/home-manager",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/5w3n8ay7qj645wm9j0ibmi4xpllbf1kx-source/home-manager", "path": "/nix/store/n40rh79zxzb143bjilqidmm3zgzi42jp-source/home-manager",
"type": "path" "type": "path"
} }
}, },
@@ -1766,11 +1766,11 @@
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-QahOuoQdXshu38W5uO7hLhG/yFkT7S2l8Dxicq0wdGk=", "narHash": "sha256-QahOuoQdXshu38W5uO7hLhG/yFkT7S2l8Dxicq0wdGk=",
"path": "/nix/store/w3vx9j80bpmgjjx4sknyba72387a2146-source/programs", "path": "/nix/store/6mqc828sjpxs6dij407simg5fv7dk9zl-source/programs",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/w3vx9j80bpmgjjx4sknyba72387a2146-source/programs", "path": "/nix/store/6mqc828sjpxs6dij407simg5fv7dk9zl-source/programs",
"type": "path" "type": "path"
} }
}, },
@@ -1838,11 +1838,11 @@
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-0Ztx5DVQ2I7hvCK/qjGa4XTdRgbzM8rhf19m0al8lVM=", "narHash": "sha256-0Ztx5DVQ2I7hvCK/qjGa4XTdRgbzM8rhf19m0al8lVM=",
"path": "/nix/store/w3vx9j80bpmgjjx4sknyba72387a2146-source/services/sddm", "path": "/nix/store/6mqc828sjpxs6dij407simg5fv7dk9zl-source/services/sddm",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/w3vx9j80bpmgjjx4sknyba72387a2146-source/services/sddm", "path": "/nix/store/6mqc828sjpxs6dij407simg5fv7dk9zl-source/services/sddm",
"type": "path" "type": "path"
} }
}, },
@@ -1873,12 +1873,12 @@
}, },
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-+VR7Gqp5tzuLE71QLlWlot1/iEKo0GbpOuo33XL9yPA=", "narHash": "sha256-QvVqbEr5sjrmPnaos2botJoathX8s9jOCx98+cLbOpM=",
"path": "/nix/store/5w3n8ay7qj645wm9j0ibmi4xpllbf1kx-source/system-config", "path": "/nix/store/n40rh79zxzb143bjilqidmm3zgzi42jp-source/system-config",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/5w3n8ay7qj645wm9j0ibmi4xpllbf1kx-source/system-config", "path": "/nix/store/n40rh79zxzb143bjilqidmm3zgzi42jp-source/system-config",
"type": "path" "type": "path"
} }
}, },

View File

@@ -91,7 +91,7 @@
nameservers = [ "1.1.1.1" "1.0.0.1" ]; nameservers = [ "1.1.1.1" "1.0.0.1" ];
networkmanager.enable = true; networkmanager.enable = true;
firewall.allowedTCPPorts = [ 22 80 443 ]; firewall.allowedTCPPorts = [ 22 80 443 ];
firewall.interfaces."ve-traefik".allowedTCPPorts = [ 9000 8080 6080 ]; firewall.interfaces."ve-traefik".allowedTCPPorts = [ 9000 8080 6080 8123 ];
hosts = { hosts = {
"192.168.100.11" = [ "blunkall.us" "*.blunkall.us" "*.local.blunkall.us" ]; "192.168.100.11" = [ "blunkall.us" "*.blunkall.us" "*.local.blunkall.us" ];
}; };
@@ -240,6 +240,10 @@
nh.enable = true; nh.enable = true;
ollama.enable = true;
homeassistant.enable = true;
steam.enable = false; steam.enable = false;
virtualization = { virtualization = {
@@ -257,6 +261,7 @@
nextcloud.enable = true; nextcloud.enable = true;
gitlab.enable = true; gitlab.enable = true;
}; };
}; };
}; };

View File

@@ -146,6 +146,12 @@
middlewares = [ "authentik" ]; middlewares = [ "authentik" ];
tls.certResolver = "cloudflare"; tls.certResolver = "cloudflare";
}; };
homeassistant = {
entryPoints = [ "localsecure" "websecure" ];
rule = "Host(`hass.blunkall.us`)";
service = "homepage";
tls.certResolver = "cloudflare";
};
jellyfin = { jellyfin = {
entryPoints = [ "localsecure" "websecure" ]; entryPoints = [ "localsecure" "websecure" ];
rule = "Host(`jellyfin.blunkall.us`)"; rule = "Host(`jellyfin.blunkall.us`)";
@@ -178,18 +184,19 @@
}; };
traefik = { traefik = {
entryPoints = [ "localsecure" ]; entryPoints = [ "localsecure" "websecure" ];
rule = "Host(`traefik.local.blunkall.us`)"; rule = "Host(`traefik.blunkall.us`)";
service = "api@internal"; service = "api@internal";
tls.certResolver = "cloudflare"; tls.certResolver = "cloudflare";
middlewares = [ "authentik" ];
}; };
pihole = { /*pihole = {
entryPoints = [ "localsecure" ]; entryPoints = [ "localsecure" ];
rule = "Host(`pihole.local.blunkall.us`)"; rule = "Host(`pihole.blunkall.us`)";
service = "pihole"; service = "pihole";
tls.certResolver = "cloudflare"; tls.certResolver = "cloudflare";
}; };*/
}; };
middlewares = { middlewares = {

View File

@@ -5,5 +5,6 @@
./openssh ./openssh
./pipewire ./pipewire
./containers ./containers
./homeassistant
]; ];
} }

View File

@@ -0,0 +1,27 @@
{ config, lib, ... }: {
options.sysconfig.opts.homeassistant.enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.sysconfig.opts.homeassistant.enable {
services.home-assistant = {
enable = true;
configDir = "/ssd1/Home-Assistant/data";
extraComponents = [
"esphome"
"met"
"radio_browser"
];
config = {
default_config = {};
};
};
};
}