hass: install esphome and update firewall
This commit is contained in:
parent
c4f3018a33
commit
c7de1294db
@ -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;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user