bug-guix
[Top][All Lists]
Advanced

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

bug#25093: Configure file for system-wide substitutes


From: Chris Marusich
Subject: bug#25093: Configure file for system-wide substitutes
Date: Sat, 03 Dec 2016 02:33:43 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

"Thompson, David" <address@hidden> writes:

> On Fri, Dec 2, 2016 at 12:25 PM, Hartmut Goebel
> <address@hidden> wrote:
>> Hi,
>>
>> when publishing packages in the local network, one wants to use this
>> substitute without passing --substitute-urls on every relevant run on guix.
>>
>> I suggest implementing a config-file for storing the substitute-urls,
>> much like the sources.list on Debian systems.
>>
>> In the long run we'll need this for enterprise setup anyway :-)
>> Enterprises tend to fetch software from their internal  repositories only .
>
> Just run the daemon with the subsitute URLs you want using the
> --substitute-urls flag.

The way to do this may not be obvious unless you've done it before.
Here's an example of how I do this in my own operating system config
(for details, see '(guix) Service Reference' for the documentation of
the 'modify-services' syntax):

--8<---------------cut here---------------start------------->8---
(define %modified-desktop-services
  (modify-services %desktop-services
    (guix-service-type config =>
                       (guix-configuration
                        (inherit config)
                        (substitute-urls
                         '("https://hydra-mirror.marusich.info";
                           "https://mirror.hydra.gnu.org";
                           "https://hydra.gnu.org";))))))
--8<---------------cut here---------------end--------------->8---

Then you just declare the services as usual, for example:

--8<---------------cut here---------------start------------->8---
(operating-system
 (services (cons* (tor-service)
                  (gnome-desktop-service)
                  (xfce-desktop-service)
                  %modified-desktop-services))
--8<---------------cut here---------------end--------------->8---

-- 
Chris

Attachment: signature.asc
Description: PGP signature


reply via email to

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