diff --git a/configs/pepe/home-assistant.nix b/configs/pepe/home-assistant.nix index 449dd30..72ad122 100644 --- a/configs/pepe/home-assistant.nix +++ b/configs/pepe/home-assistant.nix @@ -216,13 +216,8 @@ in { recommendedProxySettings = true; virtualHosts = { "iot.pepe.private" = { - serverAliases = [ - "hass.pepe.private" - "home.pepe.private" - ]; - locations."/" = { - proxyPass = "http://pepe.private:8123"; - }; + serverAliases = [ "hass.pepe.private" "home.pepe.private" ]; + locations."/" = { proxyPass = "http://pepe.private:8123"; }; }; }; }; diff --git a/configs/pepe/home-assistant/mqtt.nix b/configs/pepe/home-assistant/mqtt.nix index 09c1b3b..6a22ffa 100644 --- a/configs/pepe/home-assistant/mqtt.nix +++ b/configs/pepe/home-assistant/mqtt.nix @@ -1,8 +1,7 @@ -{ lib, ... }: -{ +{ lib, ... }: { services.homeAssistantConfig.mqtt = { - # discovery = false; + # discovery = false; # for mosquitto broker = "127.0.0.1"; username = lib.fileContents ; diff --git a/configs/pepe/home-assistant/sonoff.nix b/configs/pepe/home-assistant/sonoff.nix index 51bf1ec..818ccb4 100644 --- a/configs/pepe/home-assistant/sonoff.nix +++ b/configs/pepe/home-assistant/sonoff.nix @@ -1,48 +1,48 @@ { pkgs, config, lib, ... }: +let + + sonoffSwitches = { + "pal01" = { + label = "Schlafzimmer"; + icon = "mdi:lightbulb-on"; + }; + "pal02" = { + label = "Schlafzimmer"; + icon = "mdi:lightbulb-on"; + }; + "pal03" = { + label = "Wohnzimmer"; + icon = "mdi:lightbulb-on"; + }; + "pal04" = { + label = "Wohnzimmer"; + icon = "mdi:lightbulb-on"; + }; + "pal05" = { + label = "TV"; + icon = "mdi:television"; + }; + "pal06" = { + label = "Küche"; + icon = "mdi:lightbulb-on"; + }; + "pal07" = { + label = "Nummer 7"; + icon = "mdi:power-plug-off"; + }; + "pal08" = { + label = "Nummer 8"; + icon = "mdi:power-plug-off"; + }; + }; + + toSwitch = name: "switch.${name}"; -let unstablePkgs = import { }; in { - services.homeAssistantConfig = let + imports = [ ./mqtt.nix ]; - sonoffSwitches = { - "pal01" = { - label = "Schlafzimmer"; - icon = "mdi:lightbulb-on"; - }; - "pal02" = { - label = "Schlafzimmer"; - icon = "mdi:lightbulb-on"; - }; - "pal03" = { - label = "Wohnzimmer"; - icon = "mdi:lightbulb-on"; - }; - "pal04" = { - label = "Wohnzimmer"; - icon = "mdi:lightbulb-on"; - }; - "pal05" = { - label = "TV"; - icon = "mdi:television"; - }; - "pal06" = { - label = "Küche"; - icon = "mdi:lightbulb-on"; - }; - "pal07" = { - label = "Nummer 7"; - icon = "mdi:power-plug-off"; - }; - "pal08" = { - label = "Nummer 8"; - icon = "mdi:power-plug-off"; - }; - }; - - toSwitch = name: "switch.${name}"; - - in { + services.homeAssistantConfig = { homeassistant = { customize = lib.mapAttrs' (entity: value: { @@ -74,15 +74,20 @@ in { }]; group = { - bed_room = { entities = builtins.map toSwitch [ "pal01" "pal02"]; }; + bed_room = { entities = builtins.map toSwitch [ "pal01" "pal02" ]; }; living_room = { entities = builtins.map toSwitch [ "pal03" "pal04" ]; }; tv = { entities = builtins.map toSwitch [ "pal05" ]; }; kitchen = { entities = builtins.map toSwitch [ "pal06" ]; }; - unknown = { - entities = builtins.map toSwitch [ "pal07" "pal08" ]; - }; + unknown = { entities = builtins.map toSwitch [ "pal07" "pal08" ]; }; all_lights = { - entities = builtins.map toSwitch [ "pal01" "pal02" "pal03" "pal04" "pal05" "pal06" ]; + entities = builtins.map toSwitch [ + "pal01" + "pal02" + "pal03" + "pal04" + "pal05" + "pal06" + ]; }; }; diff --git a/configs/workhorse/gogs.nix b/configs/workhorse/gogs.nix index e4a6e07..7d8cd59 100644 --- a/configs/workhorse/gogs.nix +++ b/configs/workhorse/gogs.nix @@ -28,8 +28,7 @@ let }; }; -in -{ +in { services.nginx = { enable = true; diff --git a/images/remote-install/config.nix b/images/remote-install/config.nix index e3951da..96a2a39 100644 --- a/images/remote-install/config.nix +++ b/images/remote-install/config.nix @@ -25,7 +25,6 @@ in { networking.wireless.enable = true; networking.wireless.networks."ssid".psk = "password"; - # configuration environment.extraInit = '' # use vi shortcuts