bebop: Enable initial home-assistant
This commit is contained in:
parent
01e585722d
commit
d3d52ea826
2 changed files with 54 additions and 0 deletions
|
@ -144,6 +144,7 @@
|
||||||
./modules/uptime_kuma.nix
|
./modules/uptime_kuma.nix
|
||||||
./modules/rss.nix
|
./modules/rss.nix
|
||||||
./modules/wiki.nix
|
./modules/wiki.nix
|
||||||
|
./modules/home-assistant.nix
|
||||||
|
|
||||||
# Host-specific config
|
# Host-specific config
|
||||||
nixos-hardware.nixosModules.raspberry-pi-4
|
nixos-hardware.nixosModules.raspberry-pi-4
|
||||||
|
|
53
modules/home-assistant.nix
Normal file
53
modules/home-assistant.nix
Normal 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Reference in a new issue