[Top][All Lists]

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

Re: how to split config.scm in multiple files

From: Julien Lepiller
Subject: Re: how to split config.scm in multiple files
Date: Sat, 17 Nov 2018 10:16:53 +0100
User-agent: K-9 Mail for Android


You can create a module, say /etc/config/base-services.scm

To include it, you need to make it a module, so in base-services.scm:

(define-module (base-services)
  #:use-module (gnu services base)
  #:export (my-services))
(define my-services (cons*.… %base-services))

And in your config.scm, you can import this module like so:

(add-to-load-path "/etc/config")
(use-modules (base-services))

  (services my-services))

I don't think you can include a scheme file in the operating-system record 
directly, but maybe someone will prove me wrong :)

Le 17 novembre 2018 09:59:02 GMT+01:00, Giovanni Biscuolo <address@hidden> a 
écrit :
>Hello Help! :-)
>sorry but I'm new to Guile
>please is there a way to include external .scm files in my main
>config.scm, I tried with Guile local inclusion in config.scm
> (include base-services.scm)
>but I get
>sudo guix system reconfigure config.scm
>config.scm:8:0: error: extraneous field initializers (include)

reply via email to

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