hass: install esphome and update firewall

This commit is contained in:
Motiejus Jakštys 2023-11-14 23:36:43 +02:00
parent c4f3018a33
commit c7de1294db

View File

@ -1,6 +1,7 @@
{
config,
lib,
pkgs,
myData,
...
}: let
@ -13,7 +14,7 @@ in {
config = lib.mkIf cfg.enable {
mj.services.friendlyport.ports = [
{
subnets = myData.subnets.motiejus.cidrs;
subnets = [myData.subnets.tailscale.cidr];
tcp = [myData.ports.hass];
}
{
@ -22,6 +23,8 @@ in {
}
];
environment.systemPackages = [pkgs.esphome]; # so it lands in PATH
services = {
esphome = {
enable = true;
@ -52,7 +55,7 @@ in {
auth_providers = [
{
type = "trusted_networks";
trusted_networks = [myData.subnets.tailscale.cidr];
trusted_networks = myData.subnets.motiejus.cidrs;
}
];
};