ctucx.git: nixfiles

ctucx' nixfiles

commit 93e5d2ec0b42812ca8bedc28e912b5627bee890c
parent e777b57b712edb595e63d7b379d521aec45eb24e
Author: Leah (ctucx) <git@ctu.cx>
Date: Tue, 14 Mar 2023 16:09:51 +0100

machines/lollo/smarthome/homebridge: add second instance
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/machines/lollo/smarthome/homebridge.nix b/machines/lollo/smarthome/homebridge.nix
@@ -11,6 +11,14 @@
     description  = "Home Bridge";
   };
 
+  users.users.homebridge-isa  = {
+    home         = "/var/lib/homebridge-isa";
+    createHome   = true;
+    group        = "homebridge";
+    isSystemUser = true;
+    description  = "Home Bridge";
+  };
+
   systemd.services.homebridge = {
     enable        = true;
     wantedBy      = [ "multi-user.target" ];

@@ -24,4 +32,17 @@
     };
   };
 
+  systemd.services.homebridge-isa = {
+    enable        = true;
+    wantedBy      = [ "multi-user.target" ];
+    serviceConfig = {
+      User            = "homebridge-isa";
+      Restart         = "always";
+      RestartSec      = "15";
+      EnvironmentFile = "${pkgs.homebridge}/env";
+      ExecStart       = "${pkgs.homebridge}/bin/homebridge --no-qrcode --user-storage-path /var/lib/homebridge-isa";
+      AmbientCapabilities = "CAP_NET_RAW";
+    };
+  };
+
 }
diff --git a/machines/lollo/smarthome/mqtt-webui/config.nix b/machines/lollo/smarthome/mqtt-webui/config.nix
@@ -222,7 +222,7 @@ in {
           title = "Temperature-Sensors";
           items = [
             {
-              title     = "Shelf";
+              title     = "Window";
               type      = "text";
               topic     = "zigbee2mqtt/tuya_sensor_l";
               icon      = "icons/temperature.png";