From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: Tip of the day: storing your GuixSD config in the instantiated system Date: Mon, 28 Aug 2017 19:46:13 +0300 Message-ID: <87h8wrljxm.fsf@gmail.com> References: <871snzfl4s.fsf@gnu.org> <87a82mp2jq.fsf@gmail.com> <877exngapp.fsf@gnu.org> 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]:47260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmNB5-0006LB-F0 for help-guix@gnu.org; Mon, 28 Aug 2017 12:46:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmNB2-0002mz-DF for help-guix@gnu.org; Mon, 28 Aug 2017 12:46:19 -0400 In-Reply-To: <877exngapp.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 28 Aug 2017 14:04:18 +0200") 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: help-guix Ludovic Court=C3=A8s (2017-08-28 14:04 +0200) wrote: > Hi Mekeor, > > (I think you forgot to Cc: the list.) > > Mekeor Melire skribis: > >> Ludovic Court=C3=A8s writes: >> >>> Hello Guix! >>> >>> Following a discussion we had at the GHM today, here=E2=80=99s the tip = of the >>> day! >> >> Greetings to everyone at GHM! >> >>> But wait: we can already store the config file in the instantiated >>> system! Here=E2=80=99s how: >>> >>> (operating-system >>> ;; =E2=80=A6 >>> (services (cons (simple-service 'store-my-config >>> etc-service-type >>> `(("config.scm" >>> ,(local-file (assoc-ref >>> (current-source-lo= cation) >>> 'filename))))) >>> =E2=80=A6))) >>> >>> You instantiate that, and then /etc/config.scm (aka. >>> /run/current-system/etc/config.scm, >>> aka. /var/guix/profiles/system/etc/config.scm) contains the config file. >> >> Because of the frequent demand for it, I think it would make sense to >> offer this as pre-defined service by default, as part of Guix itself. >> What do you think? I was going to write the same: I also think it would be good to make this service the default one, so that we can always point a user to the system config the current system was reconfigured with. --=20 Alex