Compare commits

...

5 commits

Author SHA1 Message Date
Nickiel12
a13150440e added needed python modules 2024-08-18 20:25:35 -07:00
Nickiel12
ee26c4437d added tailscale entries for home-assistant 2024-08-18 17:51:19 -07:00
Nickiel12
f40adac04e removed bug-causing issue 2024-08-18 17:46:03 -07:00
Nickiel12
298c851efc switched to home-assistant 2024-08-18 17:30:11 -07:00
Nickiel12
fbfd85d5ca mosquitto stuff 2024-08-18 17:05:00 -07:00
5 changed files with 71 additions and 16 deletions

View file

@ -9,11 +9,12 @@
./configuration.nix
./hardware-configuration.nix
./modules/dnsmasq.nix
./modules/domoticz.nix
./modules/firewall.nix
./modules/forgejo.nix
./modules/headscale.nix
./modules/home-assistant.nix
./modules/msmtp.nix
./modules/mosquitto.nix
./modules/nginx.nix
./modules/nextcloud.nix
./modules/nicks_nextcould_integrations.nix

View file

@ -24,4 +24,9 @@
type = "A";
value = "100.64.0.1";
}
{
name = "home-assistant.nickiel.net";
type = "A";
value = "100.64.0.1";
}
]

View file

@ -1,15 +0,0 @@
{ config, lib, pkgs, ... }:
{
services.domoticz = {
enable = true;
port = 8981;
bind = "0.0.0.0";
};
networking.firewall = {
allowedTCPPorts = [8981];
allowedUDPPorts = [8981];
};
}

View file

@ -0,0 +1,45 @@
{ config, lib, pkgs, ... }:
{
services.home-assistant = {
enable = true;
openFirewall = true;
# List extraComponents here to be installed. The names can be found here:
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/home-assistant/component-packages.nix
# Components listed here will be possible to add via the webUI if not
# automatically picked up.
extraComponents = [
"tasmota"
"history"
"history_stats"
"mqtt"
];
extraPackages = python3Packages:
with python3Packages; [
numpy
pyturbojpeg
# psycopg2 # uncomment for recorder postgressql support
];
config = {
};
};
services.nginx.virtualHosts = {
"home-assistant.nickiel.net" = {
locations."/" = {
proxyPass = "http://127.0.0.1:8123";
proxyWebsockets = true;
extraConfig = ''
allow 100.64.0.0/16;
allow 10.0.0.114;
allow 127.0.0.1;
deny all;
'';
};
};
};
}

View file

@ -0,0 +1,19 @@
{ config, lib, pkgs, ... }:
{
services.mosquitto = {
enable = true;
listeners = [
{
acl = [ "pattern readwrite #" ];
omitPasswordAuth = true;
settings.allow_anonymous = true;
}
];
};
networking.firewall = {
allowedTCPPorts = [ 1883 ];
};
}