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:41:15 +0300 Message-ID: <87lgm3lk5w.fsf@gmail.com> References: <871snzfl4s.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]:46224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmN6J-0004gq-9B for help-guix@gnu.org; Mon, 28 Aug 2017 12:41:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmN6G-0007Rr-6g for help-guix@gnu.org; Mon, 28 Aug 2017 12:41:23 -0400 In-Reply-To: <871snzfl4s.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 25 Aug 2017 22:27:47 +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-25 22:27 +0200) wrote: > Hello Guix! > > Following a discussion we had at the GHM today, here=E2=80=99s the tip of= the day! > > People often ask how they could store their GuixSD config alongside the > instantiated system in the store. Guix maintainers usually grumpily > reply =E2=80=9Cnah, don=E2=80=99t do this, because the config file is not > self-contained, so that=E2=80=99s not good enough.=E2=80=9D > > 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-loca= tion) > '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. > > Pretty neat no? Nice tip indeed, thanks! --=20 Alex