https://github.com/duncaen/void-mirror
https://github.com/duncaen/void-mirror
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/duncaen/void-mirror
- Owner: Duncaen
- Created: 2023-05-21T17:46:03.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-23T01:38:38.000Z (about 3 years ago)
- Last Synced: 2025-03-03T06:26:11.513Z (over 1 year ago)
- Language: Go
- Size: 34.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# void-mirror
Simple daemon that mirrors xbps repositories.
## Configuration
The configuration is loaded from `config.hcl` or a hcl or json file specified using the `-conffile` flag.
```hcl
jobs = 8
repository {
upstream = "https://repo-de.voidlinux.org/current"
interval = "30s"
architecture = "x86_64"
destination = "/srv/www/current"
}
repository {
upstream = "https://repo-de.voidlinux.org/current/nonfree"
interval = "30s"
architecture = "x86_64"
destination = "/srv/www/current/nonfree"
}
repository {
upstream = "https://repo-de.voidlinux.org/current/multilib"
interval = "30s"
architecture = "x86_64"
destination = "/srv/www/current/multilib"
}
```
Example configuration to mirror all repositories:
```hcl
locals {
upstream = "https://repo-fi.voidlinux.org"
glibc = [
for arch in ["x86_64", "i686", "armv6l", "armv7l"]: [
{arch = arch, path = "/current"},
{arch = arch, path = "/current/debug"},
{arch = arch, path = "/current/nonfree"},
{arch = arch, path = "/current/bootstrap"},
]
]
multilib = [
{arch = "x86_64", path = "/current/multilib"},
{arch = "x86_64", path = "/current/multilib/nonfree"},
]
musl = [
for arch in ["x86_64-musl", "armv6l-musl", "armv7l-musl"]: [
{arch = arch, path = "/current/musl"},
{arch = arch, path = "/current/musl/debug"},
{arch = arch, path = "/current/musl/nonfree"},
{arch = arch, path = "/current/musl/bootstrap"},
]
]
aarch64 = [
for arch in ["aarch64", "aarch64-musl"]: [
{arch = arch, path = "/current/aarch64"},
{arch = arch, path = "/current/aarch64/debug"},
{arch = arch, path = "/current/aarch64/nonfree"},
{arch = arch, path = "/current/aarch64/bootstrap"},
]
]
}
jobs = 8
dynamic "repository" {
for_each = flatten(concat(glibc, multilib, musl, aarch64))
iterator = repo
content {
upstream = "${upstream}/${repo.value.path}"
interval = "30s"
architecture = "${repo.value.arch}"
destination = "/srv/www/${repo.value.path}"
}
}
```