archipelago systemd service
This commit is contained in:
parent
7e781a9a31
commit
a7bca09b81
1 changed files with 28 additions and 0 deletions
|
|
@ -115,6 +115,34 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services = {
|
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" = {
|
"update-from-flake" = {
|
||||||
path = with pkgs; [
|
path = with pkgs; [
|
||||||
git
|
git
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue