diff --git a/modules/hosts/loptland/nginx.nix b/modules/hosts/loptland/nginx.nix index 99215ff..0ceda04 100644 --- a/modules/hosts/loptland/nginx.nix +++ b/modules/hosts/loptland/nginx.nix @@ -46,7 +46,7 @@ proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; ''; - proxyPass = "http://100.86.23.74:8123"; + proxyPass = "http://nixberry:8123"; }; }; diff --git a/modules/hosts/nixberry/default.nix b/modules/hosts/nixberry/default.nix index 490e496..f0faca4 100644 --- a/modules/hosts/nixberry/default.nix +++ b/modules/hosts/nixberry/default.nix @@ -46,6 +46,7 @@ topLevel: { # System modules base server + bluetooth cholli root diff --git a/modules/hosts/nixberry/homeassistant.nix b/modules/hosts/nixberry/homeassistant.nix index bdfe215..9df3dca 100644 --- a/modules/hosts/nixberry/homeassistant.nix +++ b/modules/hosts/nixberry/homeassistant.nix @@ -48,28 +48,6 @@ mobile_app = ""; recorder = ""; - lovelace = { - # mode = "yaml"; - resources = [ - { - url = "/local/nixos-lovelace-modules/vacuum-card.js"; - type = "module"; - } - { - url = "/local/nixos-lovelace-modules/bubble-card.js"; - type = "module"; - } - { - url = "/local/nixos-lovelace-modules/clock-weather-card.js"; - type = "module"; - } - { - url = "/local/nixos-lovelace-modules/mushroom.js"; - type = "module"; - } - ]; - }; - http = { use_x_forwarded_for = true; trusted_proxies = [ @@ -77,6 +55,212 @@ ]; }; }; + + lovelaceConfigWritable = true; + lovelaceConfig = [ + { + tile = "main-dashboard"; + views = [ + { + title = "Home"; + sections = [ + { + type = "grid"; + cards = [ + { + type = "map"; + entities = [ + { entity = "person.christoph_hollizeck"; } + { entity = "person.kuralay_aman"; } + { entity = "zone.home"; } + ]; + theme_mode = "auto"; + grid_options = { + columns = "full"; + rows = 6; + }; + } + { + show_current = true; + show_forecast = true; + type = "weather-forecast"; + entity = "weather.forecast_home"; + forecast_type = "hourly"; + forecast_slots = 5; + } + { + display_order = "duedate_asc"; + type = "todo-list"; + entity = "todo.shopping_list"; + title = "Shopping List"; + hide_completed = true; + } + ]; + } + ]; + badges = [ + { + type = "entity"; + show_name = true; + show_state = true; + show_icon = true; + entity = "person.christoph_hollizeck"; + name = { + type = "entity"; + }; + show_entity_picture = true; + } + { + type = "entity"; + show_name = true; + show_state = true; + show_icon = true; + entity = "person.kuralay_aman"; + show_entity_picture = true; + } + ]; + header = { + layout = "center"; + badges_position = "bottom"; + badges_wrap = "scroll"; + card = { + type = "markdown"; + text_only = true; + content = "# Hello {{ user }}\n"; + }; + }; + } + { + type = "sections"; + max_columns = 2; + title = "living-room"; + path = "living-room"; + sections = [ + { + type = "grid"; + cards = [ + { + type = "history-graph"; + entities = [ { entity = "sensor.living_room_temperature"; } ]; + title = "Temperature"; + } + ]; + } + { + type = "grid"; + cards = [ + { + type = "history-graph"; + entities = [ { entity = "sensor.living_room_humidity"; } ]; + title = "Humidity"; + } + ]; + } + ]; + cards = [ ]; + } + { + type = "sections"; + max_columns = 3; + title = "kitchen"; + path = "kitchen"; + sections = [ + { + type = "grid"; + cards = [ + { + type = "thermostat"; + entity = "climate.kueche_radiator"; + } + ]; + } + { + type = "grid"; + cards = [ + { + type = "custom:vacuum-card"; + entity = "vacuum.sl60d"; + } + ]; + } + { + type = "grid"; + cards = [ + { + type = "glance"; + entities = [ + { + entity = "switch.kettle_socket_1"; + name = { + type = "device"; + }; + show_last_changed = true; + } + { entity = "sensor.kettle_total_energy"; } + ]; + } + { + show_name = true; + show_icon = true; + show_state = true; + type = "glance"; + entities = [ + { + entity = "switch.shelf_socket_1"; + show_last_changed = true; + name = { + type = "device"; + }; + } + { entity = "sensor.shelf_total_energy"; } + ]; + state_color = true; + } + ]; + } + ]; + } + { + type = "sections"; + max_columns = 3; + title = "bedroom"; + path = "bedroom"; + sections = [ + { + type = "grid"; + cards = [ + { + type = "thermostat"; + entity = "climate.bedroom_radiator"; + } + ]; + } + { + type = "grid"; + cards = [ + { + type = "history-graph"; + entities = [ { entity = "sensor.bedroom_temperature"; } ]; + title = "Temperature"; + } + ]; + } + { + type = "grid"; + cards = [ + { + type = "history-graph"; + entities = [ { entity = "sensor.bedroom_humidity"; } ]; + title = "Humidity"; + } + ]; + } + ]; + } + ]; + + } + ]; openFirewall = true; }; };