[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding Substitute Mirrors page to installer

From: raid5atemyhomework
Subject: Adding Substitute Mirrors page to installer
Date: Sun, 07 Mar 2021 02:46:41 +0000

Hi Guix Developers,

I want to add a page to the installer to allow selection of substitute mirrors. 
 In particular, from my ISP, the SJTU mirror is significantly faster 
(1MB/s->5MB/s) than directly from `` (4kB/s->40kB/s), so I think 
putting that option to the installer would be beneficial to others in similar 

However, the current `(gnu installer services)` assumes that snippets are added 
to a list of services. To implement substitute mirrors, I need to insert a 
`modify-services` form with a `(guix-service-type config => (guix-configuration 
(inherit config) (substitute-urls <whatever>))`.

What I want to propose is something like this:

* Add a `snippet-type` field to `<system-service>`, default `'service-list`.
  * The field can instead be set to `'modify-services` to mean that the snippet 
is to be in a `modify-services` form.
* In `system-services->configuration`, filter services according to 
`snippet-type` and put the snippets in the appropriate parts of the `service` 
* Add entries for the SJTU mirror (with fallback to the original 
``) and the default unmirrored ``, with 
`system-service-type` of `'substitute-urls`.
* Then in `(gnu installer newt services)`, add a page for `'substitute-urls`.

What do you think?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]