Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

arch-mirror (stormwing)

This container mirrors the Arch Linux repositories.

General

The garuda-arch-mirror service syncs the mirror from its configured upstream and serves it through nginx. Synced packages are additionally pushed to Cloudflare R2 with rclone, so users can also fetch them from there. The mirror directory is shared with chaotic-v4, which serves it as /srv/http/arch-mirror as well.

Nix expression

{
  config,
  garuda-lib,
  sources,
  ...
}:
{
  imports = sources.defaultModules ++ [ ../../modules ];

  garuda = garuda-lib.mkMonitoring {
    host = "stormwing";
    units = [
      "garuda-arch-mirror.service"
      "nginx.service"
    ];
  };

  services.garuda-arch-mirror = {
    enable = true;
    upstreamUrl = "rsync://f.matthieul.dev/mirror/archlinux/";
    lastupdateUrl = "https://f.matthieul.dev/mirror/archlinux/lastupdate";
    tls = false;
    rcloneConfig = config.sops.secrets."cloudflare/r2_rclone".path;
    rcloneDest = "r2:/mirror/arch";
  };

  sops.secrets = garuda-lib.mkSecrets [ "cloudflare/r2_rclone" ];

  system.stateVersion = "25.05";
}