This commit is contained in:
Ingolf Wagner 2020-04-09 16:51:39 +02:00
parent 4df3c4ae8c
commit 239821b59d
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
5 changed files with 55 additions and 58 deletions

View file

@ -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"; };
};
};
};

View file

@ -1,8 +1,7 @@
{ lib, ... }:
{
{ lib, ... }: {
services.homeAssistantConfig.mqtt = {
# discovery = false;
# discovery = false;
# for mosquitto
broker = "127.0.0.1";
username = lib.fileContents <secrets/home-assistant/mqtt-user>;

View file

@ -1,9 +1,5 @@
{ pkgs, config, lib, ... }:
let unstablePkgs = import <nixpkgs-unstable> { };
in {
services.homeAssistantConfig = let
let
sonoffSwitches = {
"pal01" = {
@ -44,6 +40,10 @@ in {
in {
imports = [ ./mqtt.nix ];
services.homeAssistantConfig = {
homeassistant = {
customize = lib.mapAttrs' (entity: value: {
name = toSwitch entity;
@ -78,11 +78,16 @@ in {
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"
];
};
};

View file

@ -28,8 +28,7 @@ let
};
};
in
{
in {
services.nginx = {
enable = true;

View file

@ -25,7 +25,6 @@ in {
networking.wireless.enable = true;
networking.wireless.networks."ssid".psk = "password";
# configuration
environment.extraInit = ''
# use vi shortcuts