WIP: minecraft: Add daily restart timer
This commit is contained in:
parent
4c94932490
commit
d44c7be1a3
|
@ -91,6 +91,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
autoStart = false;
|
autoStart = false;
|
||||||
|
extraOptions = [ "-i" ];
|
||||||
ports = [ "25565:25565" ];
|
ports = [ "25565:25565" ];
|
||||||
volumes = [
|
volumes = [
|
||||||
"minecraft:/var/lib/minecraft"
|
"minecraft:/var/lib/minecraft"
|
||||||
|
@ -101,4 +102,17 @@ in {
|
||||||
"${whitelist}:/var/lib/minecraft/whitelist.json:ro"
|
"${whitelist}:/var/lib/minecraft/whitelist.json:ro"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.restart-minecraft-voor-kia = {
|
||||||
|
script = ''
|
||||||
|
#!${pkgs.runtimeShell}
|
||||||
|
set -eu
|
||||||
|
${pkgs.systemd}/bin/systemctl try-restart podman-minecraft-voor-kia.service
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.timers.restart-minecraft-voor-kia = {
|
||||||
|
requiredBy = [ "podman-minecraft-voor-kia.service" ];
|
||||||
|
timerConfig = { OnCalendar = "daily"; };
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue