1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00
Files
niveum/systems/toum/hass/default.nix
2020-10-21 00:36:10 +02:00

65 lines
1.4 KiB
Nix

{ config, pkgs, lib, ... }:
let
inherit (import ./lib.nix) triggers;
in
{
disabledModules = [
"services/misc/home-assistant.nix"
];
imports = [
./zigbee.nix
./frontend.nix
<nixos-unstable/nixos/modules/services/misc/home-assistant.nix>
];
services.home-assistant = {
enable = true;
configWritable = true;
lovelaceConfigWritable = true;
openFirewall = true;
config = {
homeassistant = {
name = "Toum";
latitude = 52.461;
longitude = 13.378;
elevation = 90; # TODO find out how high I live
unit_system = "metric";
time_zone = config.time.timeZone;
};
config = {};
discovery = {};
system_health = {};
history = {};
tradfri.host = "192.168.178.28";
sun = {};
shopping_list = {};
sensor = [
{
platform = "dwd_weather_warnings";
region_name = "Berlin";
}
];
mqtt = {
broker = "localhost";
port = 1883;
client_id = "home-assistant";
username = "albrecht";
password = lib.strings.fileContents <system-secrets/mosquitto>;
keepalive = 60;
protocol = "3.1";
discovery = true;
birth_message = {
topic = "/hass/status";
payload = "online";
};
will_message = {
topic = "/hass/status";
payload = "offline";
};
};
};
};
}