Musicbrainz search indexes update service
This commit is contained in:
parent
9fb7e53fe2
commit
a94a8a65a7
1 changed files with 23 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
{pkgs, ...}: {
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/5d71cc16-f1ee-4b87-87b2-00fdf98442bd";
|
||||
fsType = "ext4";
|
||||
|
@ -12,4 +12,26 @@
|
|||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/1402e27f-861f-4ecd-8b46-a29461ec3eeb";}
|
||||
];
|
||||
|
||||
# Update Musicbrainz search indexes once a week.
|
||||
systemd.timers."musicbrainz-update-indexes" = {
|
||||
wantedBy = ["timers.target"];
|
||||
timerConfig = {
|
||||
OnCalendar = "weekly";
|
||||
Persistent = true;
|
||||
Unit = "musicbrainz-update-indexes.service";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."musicbrainz-update-indexes" = {
|
||||
script = ''
|
||||
set -eu
|
||||
cd /home/fern/docker/stacks/musicbrainz
|
||||
${pkgs.docker}/bin/docker compose exec -T indexer python -m sir reindex --entity-type artist --entity-type release
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "fern";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue