diff options
Diffstat (limited to 'host/Spacebar-nginx/containers/spacebar-server-dev-nix/services/spacebar-server.nix')
-rwxr-xr-x | host/Spacebar-nginx/containers/spacebar-server-dev-nix/services/spacebar-server.nix | 44 |
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! +} |