From a7bca09b814cf379dea9fce2950362f2f23253ff Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Sun, 29 Jun 2025 19:40:03 +0200 Subject: [PATCH] archipelago systemd service --- hosts/nuos/configuration.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/hosts/nuos/configuration.nix b/hosts/nuos/configuration.nix index 3440155..0432fb0 100644 --- a/hosts/nuos/configuration.nix +++ b/hosts/nuos/configuration.nix @@ -115,6 +115,34 @@ in }; systemd.services = { + "archipelago" = + let + script = pkgs.writeShellScript "archipelago-server" '' + cd /home/noa/Archipelago + source bin/activate + python MultiServer.py output/AP_43890937735956963351.zip + ''; + in + { + serviceConfig = { + Type = "simple"; + User = "noa"; + ExecStart = "${script}"; + + BindPaths = [ + "/home/noa/Archipelago" + ]; + Restart = "always"; + }; + wants = [ + "network-online.target" + ]; + after = [ + "network-online.target" + ]; + restartIfChanged = true; + }; + "update-from-flake" = { path = with pkgs; [ git