Hi Guix!

I'm glad to announce the substitute server I'm running:

    https://ci.boiledscript.com

with a blog post for its latest status:

    https://ultrarare.space/en/posts/guix-build-farm/

It builds community channels and provides substitutes for x86_64-linux,
i686-linux and aarch64-linux.  The substitute server opens to adding new
channels, as long as resource permits and undistributable contents are
marked unsubstitutable.

Let me know if you want to add more channels, you can also open an issue
on Codeberg:

    https://codeberg.org/hako/Testament/issues



To use substitutes from the server, you need to authorize its signing
key first:

--8<---------------cut here---------------start------------->8---
echo '(public-key
 (ecc
  (curve Ed25519)
  (q #374EC58F5F2EC0412431723AF2D527AD626B049D657B5633AAAEBC694F3E33F9#)
 )
)' | sudo guix archive --authorize
--8<---------------cut here---------------end--------------->8---

and then use one of its mirrors, currently the following two:

    https://cache-cdn.boiledscript.com
    https://cache-de.boiledscript.com

--8<---------------cut here---------------start------------->8---
guix build hello --substitute-urls="https://cache-cdn.boiledscript.com <...>"
--8<---------------cut here---------------end--------------->8---



What's special about the substitute server is that it uses a modified
"guix publish", turning the original directory layout of publish cache:

--8<---------------cut here---------------start------------->8---
/path/to/publish/cache
├── hashes
│   ├── k0pin1y1r0vdkdbg3lwjqc52hpwjbdyb
│   └── ql2nxr2b587kjydfwivjsnhmqya957bq
└── nar
    ├── none
    │   ├── k0pin1y1r0vdkdbg3lwjqc52hpwjbdyb-hello-2.12.2.narinfo
    │   └── k0pin1y1r0vdkdbg3lwjqc52hpwjbdyb-hello-2.12.2.nar
    └── zstd
        ├── ql2nxr2b587kjydfwivjsnhmqya957bq-helix-25.01.1.narinfo
        └── ql2nxr2b587kjydfwivjsnhmqya957bq-helix-25.01.1.nar
--8<---------------cut here---------------end--------------->8---

to the following, identical to the endpoints Guix may access:
--8<---------------cut here---------------start------------->8---
/path/to/publish/cache
├── hashes
│   ├── k0pin1y1r0vdkdbg3lwjqc52hpwjbdyb
│   └── ql2nxr2b587kjydfwivjsnhmqya957bq
├── nar
│   ├── none
│   │   └── k0pin1y1r0vdkdbg3lwjqc52hpwjbdyb-hello-2.12.2
│   └── zstd
│       └── ql2nxr2b587kjydfwivjsnhmqya957bq-helix-25.01.1
├── k0pin1y1r0vdkdbg3lwjqc52hpwjbdyb.narinfo
└── ql2nxr2b587kjydfwivjsnhmqya957bq.narinfo
--8<---------------cut here---------------end--------------->8---

This allows mirroring substitutes with rsync and a file server.

Substitutes are also synced to object storage (currently Cloudflare R2
with Cloudflare CDN, a choice to reduce expenses) to facilitate
mirroring without a full clone.

Now there're three approaches to mirror the substitutes, specific steps
are covered in the blog post:

1. Full mirror (rsync + file server)
2. narinfo mirror + reverse proxy
3. narinfo mirror + redirection

Currently the "cache-cdn" mirror uses the 3. approach, to ensure
performance on querying and downloading, however there's a delay on the
redirection so either 1. or 2. is more suitable for future mirrors.  Let
me know if you're interested in hosting one :)


Thanks

Reply via email to