From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: Re: Tip of the day: storing your GuixSD config in the instantiated system Date: Tue, 29 Aug 2017 08:10:17 +0000 Message-ID: <20170829081016.n37zqzvfetpuvop4@abyayala> References: <871snzfl4s.fsf@gnu.org> <87a82mp2jq.fsf@gmail.com> <877exngapp.fsf@gnu.org> <87h8wrljxm.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tlr32apof2s7xeb4" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmbbe-0001Tl-Ik for help-guix@gnu.org; Tue, 29 Aug 2017 04:10:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmbbZ-0006AZ-Sy for help-guix@gnu.org; Tue, 29 Aug 2017 04:10:42 -0400 Received: from aibo.runbox.com ([91.220.196.211]:60814) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dmbbZ-0006A1-Jf for help-guix@gnu.org; Tue, 29 Aug 2017 04:10:37 -0400 Content-Disposition: inline In-Reply-To: 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: Peter Mikkelsen Cc: Alex Kost , help-guix --tlr32apof2s7xeb4 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Peter Mikkelsen transcribed 5.2K bytes: > If this becomes default, would it make sense for 'guix system reconfigure' > to be able to run without a configuration file and just use the default? What do you mean by that? I understand your sentence as providing a default case of "guix system reconfigure (opt args) /etc/config.scm" which then could be overwritten by explicitly stating a file? If this default location becomes configurable in the services, then yes I am for this. I have no /etc/config.scm because I track my files in git across systems, and templates for a system I am conceptualizing and writing on will also not exist at /etc/config.scm (or at least not at the moment). Our default example case is /etc/config.scm but I find it easier if you can not make a mistake by using the wrong file. so like a theoretical item in (operating-system) could be (default-system-config "/home/user/.guix-profile/share/systems/hostname/con= fig.scm") which has overwritten the default of (default-system-config "/etc/config.scm") which is then used by appropriate services making use of guix system {build= ,reconfigure} is that what you mean? The very same argument (file name) is also used for various other guix syst= em sub commands. > Den 28. aug. 2017 18.46 skrev "Alex Kost" : >=20 > > 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-location) > > >>> '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. > > > > -- > > Alex > > > > --=20 ng0 GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588 GnuPG: https://n0is.noblogs.org/my-keys https://www.infotropique.org https://krosos.org --tlr32apof2s7xeb4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlmlIWgACgkQ4i+bv+40 hYiwiA//Yq7IfwUPRHPu9RQQMUTrerkOKlruhQFIwxoJVJAxyB73FqKbSIjBeuKs 3Bd1Kcy9qx0ZUkfYZuzxszdnJPxbtYOSGjbqcTppAlh4TK3nI7D3inkdETq41Xne tV4IT+PjpkBTL+yYO4+jLScN0JT7AW/+VKQYSCEBmS3K9ZMmroysCC9TFPpiO1xy 78ehoS3SWzdoOYwDisDj0RHrTTJquyDuKnbbkN+DNNmwufxG1MYpLUSZWX/o0p3N FTfrNpoLanS+zI81Lia4LcJU35X0sGX4DT6Keon2+G8pW8wFR4PegYYQYYAa3wO5 DZtKGZBYYrO+ja/GqKNkN/sh4T4OKgzA7TFrv9vPIvWxYDapOG6K36IaM31TRW6u 1+r1Q2XCCiOQGg4oAvgjlDw8GP6kyww8XxClbQzvslENENVgLlLDUluGOdNj00my Cy27/+dWL9BFahmRzxbGsa2nLsbVH1mqkKhAW1D7WAQfWOMgRUvYfL9mniAAJX3f Op6FOmRB0smA9VvokfPxfKaYvLO+h1xnK7Z8PIdvjPQaIHvhMQ8lOOMdyUGGqv97 Dqm5RCwdYEi8x4s6Mg2nnTI2E5brrDC5i1DMjz6zaQVE54FbpCPOyQYxJn+LI6+O CdCLb18eG05yOk9eaoKOK7ay9VaLFsYjmC9GfSyPGKmNui5WpEM= =p/RZ -----END PGP SIGNATURE----- --tlr32apof2s7xeb4--