ctucx.git: nixfiles

ctucx' nixfiles

commit 1ce7c92e55791b30a08e1b73d2ad9fcc48ff8455
parent f7c333436aee8fe3e8a64819f6c1ac6711b0a680
Author: Leah (ctucx) <git@ctu.cx>
Date: Thu, 15 Feb 2024 16:03:13 +0100

machines/briefkasten/smarthome/homebridge: new instance
1 file changed, 22 insertions(+), 18 deletions(-)
M
machines/briefkasten/smarthome/homebridge.nix
|
40
++++++++++++++++++++++------------------
diff --git a/machines/briefkasten/smarthome/homebridge.nix b/machines/briefkasten/smarthome/homebridge.nix
@@ -3,22 +3,25 @@
 {
 
   users.groups.homebridge = {};
-  users.users.homebridge  = {
-    home         = "/var/lib/homebridge";
-    createHome   = true;
-    group        = "homebridge";
-    isSystemUser = true;
-    description  = "Home Bridge";
-  };
+  users.users = {
+    homebridge  = {
+      home         = "/var/lib/homebridge";
+      createHome   = true;
+      group        = "homebridge";
+      isSystemUser = true;
+      description  = "Home Bridge";
+    };
 
-  users.users.homebridge-isa  = {
-    home         = "/var/lib/homebridge-isa";
-    createHome   = true;
-    group        = "homebridge";
-    isSystemUser = true;
-    description  = "Home Bridge";
+    homebridge-na  = {
+      home         = "/var/lib/homebridge-na";
+      createHome   = true;
+      group        = "homebridge";
+      isSystemUser = true;
+      description  = "Home Bridge";
+    };
   };
 
+
   systemd.services.homebridge = {
     enable        = true;
     wantedBy      = [ "multi-user.target" ];

@@ -55,22 +58,23 @@
     };
   };
 
-  systemd.services.homebridge-isa = {
+  systemd.services.homebridge-na = {
     enable        = true;
     wantedBy      = [ "multi-user.target" ];
+
     serviceConfig = {
-      User            = "homebridge-isa";
+      User            = "homebridge-na";
 
       Restart         = "always";
       RestartSec      = "15";
 
       EnvironmentFile = "${pkgs.homebridge}/env";
 
-      ExecStart       = "${pkgs.homebridge}/bin/homebridge --no-qrcode --user-storage-path /var/lib/homebridge-isa";
+      ExecStart       = "${pkgs.homebridge}/bin/homebridge --no-qrcode --user-storage-path /var/lib/homebridge-na";
 
-      AmbientCapabilities = [ "CAP_NET_RAW" ];
+      AmbientCapabilities = "CAP_NET_RAW";
 
-      ReadWritePaths          = [ "/var/lib/homebridge-isa" ];
+      ReadWritePaths          = [ "/var/lib/homebridge-na" ];
 
       NoNewPrivileges         = true;
       PrivateTmp              = true;