{ ... }:

let
  vars = import ../vars.nix;
  docker_path = vars.primary_docker;
  calibre_path = vars.primary_calibre;
in
{
  virtualisation.oci-containers.containers = {
    automated-ffdl-alice = {
      image = "mrtyton/automated-ffdl:latest";
      user = "600:100";
      extraOptions = [ "--restart=unless-stopped" ];
      environment = {
        PUID = "600";
        PGID = "100";
      };
      volumes = [
        "${docker_path}/auto-fic/config:/config"
        "${calibre_path}/ffdl-alice:/var/lib/calibre-server"
      ];
    };
  };

  services.autopull = {
    enable = true;
    repo.FanFicFare-alice = {
      enable = true;
      path = /ZFS/ZFS-primary/calibre/ffdl-alice/config/FanFicFare;
    };
  };
}