summary refs log tree commit diff
path: root/host/Spacebar-nginx/containers/spacebar-server-dev-nix/services/spacebar-server.nix
diff options
context:
space:
mode:
Diffstat (limited to 'host/Spacebar-nginx/containers/spacebar-server-dev-nix/services/spacebar-server.nix')
-rwxr-xr-xhost/Spacebar-nginx/containers/spacebar-server-dev-nix/services/spacebar-server.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/host/Spacebar-nginx/containers/spacebar-server-dev-nix/services/spacebar-server.nix b/host/Spacebar-nginx/containers/spacebar-server-dev-nix/services/spacebar-server.nix
new file mode 100755
index 0000000..d207687
--- /dev/null
+++ b/host/Spacebar-nginx/containers/spacebar-server-dev-nix/services/spacebar-server.nix
@@ -0,0 +1,44 @@
+{ config, pkgs, lib, spacebar-server, ... }:
+
+{
+  systemd.services = {
+    "spacebar-server-api" = {
+        wantedBy = [ "multi-user.target" ];
+        after = [ "resolvconf.target" ];
+        serviceConfig = {
+            ExecStart = ''
+              ${spacebar-server.packages.${pkgs.system}.default}/bin/start-api
+              '';
+            #Restart = "never";
+            User = "root";
+            WorkingDirectory = "/var/lib/spacebar-server";
+        };
+    };
+    "spacebar-server-gateway" = {
+        wantedBy = [ "multi-user.target" ];
+        after = [ "resolvconf.target" ];
+        serviceConfig = {
+            ExecStart = ''
+              ${spacebar-server.packages.${pkgs.system}.default}/bin/start-gateway
+              '';
+            #Restart = "never";
+            User = "root";
+            WorkingDirectory = "/var/lib/spacebar-server";
+        };
+    };
+    "spacebar-server-cdn" = {
+        wantedBy = [ "multi-user.target" ];
+        after = [ "resolvconf.target" ];
+        serviceConfig = {
+            ExecStart = ''
+              ${spacebar-server.packages.${pkgs.system}.default}/bin/start-cdn
+              '';
+            #Restart = "never";
+            User = "root";
+            WorkingDirectory = "/var/lib/spacebar-server";
+        };
+    };
+  };
+
+  system.stateVersion = "22.11"; # DO NOT EDIT!
+}