all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Giovanni Biscuolo <g@xelera.eu>
Cc: help-guix@gnu.org
Subject: Re: how to split config.scm in multiple files
Date: Thu, 22 Nov 2018 14:04:03 +0100	[thread overview]
Message-ID: <87pnuxb6ws.fsf@gnu.org> (raw)
In-Reply-To: <87va4w13mx.fsf@roquette.mug.biscuolo.net> (Giovanni Biscuolo's message of "Sat, 17 Nov 2018 09:59:02 +0100")

Hello Giovanni,

Giovanni Biscuolo <g@xelera.eu> skribis:

> 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)
> ................

The ‘include’ form exists but you would need to use it at the top level.

However, I recommend using Guile’s module system instead.  An example of
that can be found here:

  • modules:
    https://git.savannah.gnu.org/cgit/guix/maintenance.git/tree/hydra/modules/sysadmin

  • config files that use these modules:
    https://git.savannah.gnu.org/cgit/guix/maintenance.git/tree/hydra/berlin.scm
    https://git.savannah.gnu.org/cgit/guix/maintenance.git/tree/hydra/build-machine.scm

Here, assuming you’re in the hydra/ directory, you’d simply run, say:

  guix system reconfigure -L ./modules ./berlin.scm

HTH!

Ludo’.

  parent reply	other threads:[~2018-11-22 13:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-17  8:59 how to split config.scm in multiple files Giovanni Biscuolo
2018-11-17  9:16 ` Julien Lepiller
2018-11-22 13:04 ` Ludovic Courtès [this message]
2018-11-27 17:57   ` Giovanni Biscuolo
2018-11-28 17:11     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pnuxb6ws.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=g@xelera.eu \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.