help-guix
[Top][All Lists]
Advanced

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

Re: Tip of the day: storing your GuixSD config in the instantiated syste


From: Ludovic Courtès
Subject: Re: Tip of the day: storing your GuixSD config in the instantiated system
Date: Wed, 30 Aug 2017 00:42:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Andreas Enge <address@hidden> skribis:

> On Fri, Aug 25, 2017 at 10:27:47PM +0200, Ludovic Courtès wrote:
>> But wait: we can already store the config file in the instantiated
>> system!  Here’s how:
>
> That is an exciting trick, thank you, Ludovic!
>
> As for making it a "default", this could be done in two ways:
> - Add it as a service to %base-services.

This wouldn’t be possible, at least not this easily, because the trick
requires the config file name, and that means it’d typically need to be
a macro used within the config file, like:

  (define (%config-file-service file)
    (simple-service 'config-file
                    etc-service-type
                    `(("config.scm" ,file))))

  (define-syntax-rule (config-file-service)
    (%config-file-service
     (local-file (assoc-ref (current-source-location)
                            'filename))))

> - Add it to the configuration templates.
> I am more in favour of the first option, as it puts less clutter into
> the configuration file.

I’m a bit reluctant to make it part of ‘%base-services’ (if it were
technically possible) because that may deceive users, since it takes
more than this config file to reproduce a GuixSD config.

Ludo’.



reply via email to

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