feat(youko): add pull-through cache for two Nix upstreams (#499)

Run nginx on youko as a loopback pull-through HTTP cache for
cache.nixos.org and cache.numtide.com, exposed by Caddy at
https://nix-cache.writefor.fun.

Assisted-by: DeepSeek Harness (deepseek-flash)
This commit is contained in:
ryan4yin | 二花 authored and GitHub committed 2026-11-01 18:27:43 +08:00
1 parent 9fe86de51d
commit 58d1af8f9d
9 files changed
+136 -8

No files matched your search

+6 -4
View File
@@ -28,7 +28,7 @@
# The official https://cache.nixos.org is always trusted and is appended
# automatically, so it does not need to be listed here.
substituters = [
# cache mirror located in China
# Domestic mirrors are fast from the LAN; query them directly first.
# status: https://mirrors.ustc.edu.cn/status/
"https://mirrors.ustc.edu.cn/nix-channels/store"
# status: https://mirror.sjtu.edu.cn/
@@ -37,11 +37,14 @@
# "https://mirrors.sustech.edu.cn/nix-channels/store"
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
# Pull-through cache for upstreams that are slow from the LAN. Nix
# appends the official cache.nixos.org last, so list its proxy here.
"https://nix-cache.writefor.fun/cache.nixos.org"
# numtide's cache (niks3), which serves the prebuilt packages of the
# numtide/llm-agents.nix flake input used for the AI agent CLIs.
"https://nix-cache.writefor.fun/cache.numtide.com"
# Direct fallback if the LAN proxy is unavailable.
"https://cache.numtide.com"
# my own cache server, currently not used.
# "https://ryan4yin.cachix.org"
];
# WARNING: every key here trusts *everything* that key signs. Add one only
@@ -49,7 +52,6 @@
# a third party the ability to ship you arbitrary store paths.
trusted-public-keys = [
"niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g="
"ryan4yin.cachix.org-1:Gbk27ZU5AYpGS9i3ssoLlwdvMIh0NxG0w8it/cv9kbU="
];
builders-use-substitutes = true;
};