From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Lepiller Subject: Re: how to split config.scm in multiple files Date: Sat, 17 Nov 2018 10:16:53 +0100 Message-ID: <3BBFCEAE-542D-4FA0-BF7D-EF6DA2A793F6@lepiller.eu> References: <87va4w13mx.fsf@roquette.mug.biscuolo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNwin-0002dS-JI for help-guix@gnu.org; Sat, 17 Nov 2018 04:16:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNwik-0007re-7v for help-guix@gnu.org; Sat, 17 Nov 2018 04:16:57 -0500 Received: from lepiller.eu ([2a00:5884:8208::1]:36742) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gNwij-0007qk-W9 for help-guix@gnu.org; Sat, 17 Nov 2018 04:16:54 -0500 In-Reply-To: <87va4w13mx.fsf@roquette.mug.biscuolo.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: help-guix@gnu.org, Giovanni Biscuolo Hi, You can create a module, say /etc/config/base-services=2Escm To include it, you need to make it a module, so in base-services=2Escm: (define-module (base-services) #:use-module (gnu services base) =E2=80=A6 #:export (my-services)) (define my-services (cons*=2E=E2=80=A6 %base-services)) And in your config=2Escm, you can import this module like so: (add-to-load-path "/etc/config") (use-modules (base-services)) (operating-system =E2=80=A6 (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 = a =C3=A9crit : >Hello Help! :-) > >sorry but I'm new to Guile > >please is there a way to include external =2Escm files in my main >config=2Escm, I tried with Guile local inclusion in config=2Escm > > (include base-services=2Escm) > >but I get > >=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E >sudo guix system reconfigure config=2Escm >config=2Escm:8:0: error: extraneous field initializers (include) >=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E > >thanks! >Giovanni