all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Mikkelsen <petermikkelsen10@gmail.com>
To: Alex Kost <alezost@gmail.com>, help-guix <help-guix@gnu.org>
Subject: Re: Tip of the day: storing your GuixSD config in the instantiated system
Date: Tue, 29 Aug 2017 11:26:03 +0200	[thread overview]
Message-ID: <CADh9keUOEtZw3dAXjuwAOnzWu_M3dQLbiKRO1842rWbuXq3n5w@mail.gmail.com> (raw)
In-Reply-To: <20170829081016.n37zqzvfetpuvop4@abyayala>

[-- Attachment #1: Type: text/plain, Size: 3416 bytes --]

That is what i mean yes

Den 29. aug. 2017 10.10 skrev "ng0" <ng0@infotropique.org>:

> 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/config.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
> system
> sub commands.
>
> > Den 28. aug. 2017 18.46 skrev "Alex Kost" <alezost@gmail.com>:
> >
> > > Ludovic Courtès (2017-08-28 14:04 +0200) wrote:
> > >
> > > > Hi Mekeor,
> > > >
> > > > (I think you forgot to Cc: the list.)
> > > >
> > > > Mekeor Melire <mekeor.melire@gmail.com> skribis:
> > > >
> > > >> Ludovic Courtès <ludo@gnu.org> writes:
> > > >>
> > > >>> Hello Guix!
> > > >>>
> > > >>> Following a discussion we had at the GHM today, here’s the tip of
> the
> > > >>> day!
> > > >>
> > > >> Greetings to everyone at GHM!
> > > >>
> > > >>> But wait: we can already store the config file in the instantiated
> > > >>> system!  Here’s how:
> > > >>>
> > > >>>   (operating-system
> > > >>>     ;; …
> > > >>>     (services (cons (simple-service 'store-my-config
> > > >>>                                     etc-service-type
> > > >>>                                     `(("config.scm"
> > > >>>                                        ,(local-file (assoc-ref
> > > >>>
> > > (current-source-location)
> > > >>>                                                      'filename)))))
> > > >>>                     …)))
> > > >>>
> > > >>> 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
> > >
> > >
>
> --
> ng0
> GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
> GnuPG: https://n0is.noblogs.org/my-keys
> https://www.infotropique.org https://krosos.org
>

[-- Attachment #2: Type: text/html, Size: 4955 bytes --]

  reply	other threads:[~2017-08-29  9:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 20:27 Tip of the day: storing your GuixSD config in the instantiated system Ludovic Courtès
     [not found] ` <87a82mp2jq.fsf@gmail.com>
2017-08-28 12:04   ` Ludovic Courtès
2017-08-28 16:46     ` Alex Kost
2017-08-28 20:23       ` Peter Mikkelsen
2017-08-29  8:10         ` ng0
2017-08-29  9:26           ` Peter Mikkelsen [this message]
2017-08-29 10:13         ` Ricardo Wurmus
2017-08-28 16:41 ` Alex Kost
2017-08-29 10:10 ` Ricardo Wurmus
2017-08-29 22:20   ` Ludovic Courtès
2017-08-29 10:30 ` Andreas Enge
2017-08-29 22:42   ` Ludovic Courtès
2017-08-30 16:07     ` Andreas Enge
2017-08-30 21:25       ` Ricardo Wurmus

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=CADh9keUOEtZw3dAXjuwAOnzWu_M3dQLbiKRO1842rWbuXq3n5w@mail.gmail.com \
    --to=petermikkelsen10@gmail.com \
    --cc=alezost@gmail.com \
    --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.