with import ./network.nix;
{
  services = {
    bazarr.enable = true;

    nginx.virtualHosts.${bazarrdomain} = {
      forceSSL = true;
      enableACME = true;
      locations."/" = {
        proxyPass = "http://localhost:6767";
        extraConfig = ''
          allow 10.0.0.0/24;
          allow 10.3.0.0/24;
          deny all;
        '';
      };
    };
  };

  networking.extraHosts = ''
    ${architect-lan} ${bazarrdomain}
    ${architect-wg} ${bazarrdomain}
  '';

  users.groups.media.members = ["bazarr"];
}