mirror of
https://github.com/kmein/niveum
synced 2026-03-28 23:31:07 +01:00
feat(hass): init
This commit is contained in:
64
systems/toum/hass/default.nix
Normal file
64
systems/toum/hass/default.nix
Normal file
@@ -0,0 +1,64 @@
|
||||
{ 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user