feat(jellyfin): add automated docker image update service and timer
Some checks failed
Flake checker / Build Nix targets (push) Has been cancelled

This commit is contained in:
2026-01-13 00:28:12 +05:30
parent 9ca0e4fa5b
commit 01e0349610

View File

@@ -1,5 +1,5 @@
{ {
unstablePkgs, pkgs,
config, config,
... ...
}: { }: {
@@ -46,4 +46,24 @@
''; '';
}; };
}; };
systemd.services.jellyfin-image-update = {
description = "Pull latest Jellyfin Docker image";
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.docker}/bin/docker pull ghcr.io/jellyfin/jellyfin:latest";
ExecStartPost = "${pkgs.systemd}/bin/systemctl restart docker-jellyfin.service";
};
};
# Systemd timer to run the update service every 5 days
systemd.timers.jellyfin-image-update = {
description = "Timer for Jellyfin image updates";
wantedBy = ["timers.target"];
timerConfig = {
OnCalendar = "Mon *-*-* 02:00:00";
OnUnitInactiveSec = "5d";
Persistent = true;
RandomizedDelaySec = "1h";
};
};
} }