yuki: add basic hass config
All checks were successful
flake check / check (push) Successful in 4m9s
fmt check / check (push) Successful in 53s
All checks were successful
flake check / check (push) Successful in 4m9s
fmt check / check (push) Successful in 53s
This commit is contained in:
parent
2a5f435576
commit
5b6e91249f
4 changed files with 158 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./hass
|
||||
./restic.nix
|
||||
./traefik.nix
|
||||
./stash.nix
|
||||
|
@ -7,5 +8,6 @@
|
|||
./wallos.nix
|
||||
./homepage.nix
|
||||
./searxng.nix
|
||||
./navidrome.nix
|
||||
];
|
||||
}
|
||||
|
|
18
hosts/yuki/services/hass/config.nix
Normal file
18
hosts/yuki/services/hass/config.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
_: {
|
||||
services.home-assistant.config = {
|
||||
lovelace.mode = "yaml";
|
||||
http = {
|
||||
server_host = "192.168.1.98";
|
||||
server_port = 8124;
|
||||
};
|
||||
homeassistant = {
|
||||
name = "Home";
|
||||
time_zone = "America/New_York";
|
||||
unit_system = "imperial";
|
||||
temperature_unit = "F";
|
||||
currency = "USD";
|
||||
country = "US";
|
||||
};
|
||||
default_config = {};
|
||||
};
|
||||
}
|
28
hosts/yuki/services/hass/default.nix
Normal file
28
hosts/yuki/services/hass/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
_: {
|
||||
imports = [
|
||||
./lovelace.nix
|
||||
./config.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = ["openssl-1.1.1w"];
|
||||
|
||||
services.home-assistant = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
extraComponents = [
|
||||
"default_config"
|
||||
"met"
|
||||
"openweathermap"
|
||||
"esphome"
|
||||
"google_translate"
|
||||
"radio_browser"
|
||||
"sonarr"
|
||||
"radarr"
|
||||
"glances"
|
||||
"epson"
|
||||
"eufy"
|
||||
"hue"
|
||||
"nanoleaf"
|
||||
];
|
||||
};
|
||||
}
|
110
hosts/yuki/services/hass/lovelace.nix
Normal file
110
hosts/yuki/services/hass/lovelace.nix
Normal file
|
@ -0,0 +1,110 @@
|
|||
_: {
|
||||
services.home-assistant.lovelaceConfig = {
|
||||
title = "Home";
|
||||
views = [
|
||||
{
|
||||
title = "Home";
|
||||
icon = "mdi:home";
|
||||
cards = [
|
||||
{
|
||||
type = "markdown";
|
||||
title = "Lovelace";
|
||||
content = "Welcome home!";
|
||||
}
|
||||
{
|
||||
type = "weather-forecast";
|
||||
entity = "weather.openweathermap";
|
||||
forecast_type = "hourly";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
title = "Living Room";
|
||||
cards = [
|
||||
{
|
||||
type = "light";
|
||||
entity = "light.living_room";
|
||||
tap_action = {action = "toggle";};
|
||||
hold_action = {action = "Default action";};
|
||||
style = {
|
||||
top = "72.8%";
|
||||
left = "75.3%";
|
||||
};
|
||||
}
|
||||
{
|
||||
type = "light";
|
||||
entity = "light.hall_light";
|
||||
tap_action = {action = "toggle";};
|
||||
hold_action = {action = "Default action";};
|
||||
style = {
|
||||
top = "72.8%";
|
||||
left = "75.3%";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
title = "Master Bedroom";
|
||||
cards = [
|
||||
{
|
||||
type = "light";
|
||||
entity = "light.master_bedroom_lamp";
|
||||
tap_action = {action = "toggle";};
|
||||
hold_action = {action = "Default action";};
|
||||
style = {
|
||||
top = "72.8%";
|
||||
left = "75.3%";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
title = "Bedroom 1";
|
||||
cards = [
|
||||
{
|
||||
type = "light";
|
||||
entity = "light.bedroom_1";
|
||||
show_state = true;
|
||||
show_icon = true;
|
||||
tap_action = {action = "toggle";};
|
||||
hold_action = {action = "Default action";};
|
||||
style = {
|
||||
top = "72.8%";
|
||||
left = "75.3%";
|
||||
};
|
||||
}
|
||||
{
|
||||
type = "light";
|
||||
entity = "light.light_panels_58_6c_84";
|
||||
show_state = true;
|
||||
show_icon = true;
|
||||
tap_action = {action = "toggle";};
|
||||
hold_action = {action = "Default action";};
|
||||
style = {
|
||||
top = "72.8%";
|
||||
left = "75.3%";
|
||||
};
|
||||
}
|
||||
{
|
||||
type = "entities";
|
||||
entities = [
|
||||
"light.hue_color_lamp_1"
|
||||
"light.hue_color_lamp_2"
|
||||
"light.hue_lightstrip_plus_1"
|
||||
"light.light_panels_58_6c_84"
|
||||
];
|
||||
style = {
|
||||
top = "72.8%";
|
||||
left = "75.3%";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
title = "Bedroom 2";
|
||||
cards = [
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue