{ config, pkgs, ... }: { virtualisation.oci-containers.backend = "podman"; virtualisation.oci-containers.containers = { palworld = { image = "thijsvanloef/palworld-server-docker:latest"; autoStart = true; ports = [ "8211:8211/udp" "27015:27015/udp" ]; environmentFiles = [ config.sops.secrets.palworld.path ]; volumes = [ "/var/lib/palworld/:/palworld/" ]; }; }; systemd.timers."restart-palworld" = { wantedBy = [ "timers.target" ]; timerConfig = { OnCalendar = "*-*-* 3:00:00"; Unit = "restart-palworld.service"; }; }; systemd.services."restart-palworld" = { script = '' set -eu ${pkgs.systemd}/bin/systemctl restart podman-palworld.service ''; serviceConfig = { Type = "oneshot"; User = "root"; }; }; sops.secrets.palworld = {}; }