diff --git a/hosts/musicbrainz/default.nix b/hosts/musicbrainz/default.nix index 68ab190..1498f44 100644 --- a/hosts/musicbrainz/default.nix +++ b/hosts/musicbrainz/default.nix @@ -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"; + }; + }; } diff --git a/suites/default.nix b/suites/default.nix index 3d8d811..b9ca9fd 100644 --- a/suites/default.nix +++ b/suites/default.nix @@ -128,6 +128,10 @@ with lib; { key = "y"; action = " Yazi "; } + { + key = "fs"; + action = " SessionSearch "; + } ]; colorschemes.gruvbox = {