Andreas Enge <andr...@enge.fr> 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’.