bebop: Enable initial home-assistant

This commit is contained in:
Payas Relekar 2023-12-25 23:29:51 +05:30
parent 01e585722d
commit d3d52ea826
2 changed files with 54 additions and 0 deletions

View file

@ -144,6 +144,7 @@
./modules/uptime_kuma.nix
./modules/rss.nix
./modules/wiki.nix
./modules/home-assistant.nix
# Host-specific config
nixos-hardware.nixosModules.raspberry-pi-4

View file

@ -0,0 +1,53 @@
{ config, lib, pkgs, ... }:
{
services.home-assistant = {
enable = true;
openFirewall = true;
configWritable = true; # remove after setup
configDir = "/var/lib/hass";
config = {
lovelace.mode = "yaml";
server_port = 8123;
server_host = [
"0.0.0.0"
"::"
];
homeassistant = {
name = "Norumbega";
unit_system = "metric";
temperature_unit = "C";
longitude = 18.52;
lattitude = 73.85;
};
};
extraComponents = [
"analytics"
"default_config"
"esphome"
"met"
];
customComponents = with pkgs.home-assistant-custom-components; [
prometheus_sensor
];
locelaceConfigWritable = true; # remove once setup
lovelaceConfig = {
title = "My Awesome Home";
views = [
{
title = "Example";
cards = [
{
type = "markdown";
title = "Lovelace";
content = "Welcome to your **Lovelace UI**.";
}
];
}
];
};
customLovelaceModules = with pkgs.home-assistant-custom-lovelace-modules; [
mini-graph-card
mini-media-player
];
};
}