unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Tip of the day: storing your GuixSD config in the instantiated system
@ 2017-08-25 20:27 Ludovic Courtès
       [not found] ` <87a82mp2jq.fsf@gmail.com>
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Ludovic Courtès @ 2017-08-25 20:27 UTC (permalink / raw)
  To: help-guix

Hello Guix!

Following a discussion we had at the GHM today, here’s 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 “nah, don’t do this, because the config file is not
self-contained, so that’s not good enough.”

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.

Pretty neat no?

Enjoy!

Ludo’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Tip of the day: storing your GuixSD config in the instantiated system
       [not found] ` <87a82mp2jq.fsf@gmail.com>
@ 2017-08-28 12:04   ` Ludovic Courtès
  2017-08-28 16:46     ` Alex Kost
  0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2017-08-28 12:04 UTC (permalink / raw)
  To: Mekeor Melire; +Cc: help-guix

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?

Why not, indeed.  I think this would have to be a macro so that the
‘current-source-location’ trick works as expected, nothing
insurmountable.

Ludo’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Tip of the day: storing your GuixSD config in the instantiated system
  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 16:41 ` Alex Kost
  2017-08-29 10:10 ` Ricardo Wurmus
  2017-08-29 10:30 ` Andreas Enge
  3 siblings, 0 replies; 14+ messages in thread
From: Alex Kost @ 2017-08-28 16:41 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

Ludovic Courtès (2017-08-25 22:27 +0200) wrote:

> Hello Guix!
>
> Following a discussion we had at the GHM today, here’s 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 “nah, don’t do this, because the config file is not
> self-contained, so that’s not good enough.”
>
> 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.
>
> Pretty neat no?

Nice tip indeed, thanks!

-- 
Alex

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Tip of the day: storing your GuixSD config in the instantiated system
  2017-08-28 12:04   ` Ludovic Courtès
@ 2017-08-28 16:46     ` Alex Kost
  2017-08-28 20:23       ` Peter Mikkelsen
  0 siblings, 1 reply; 14+ messages in thread
From: Alex Kost @ 2017-08-28 16:46 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Tip of the day: storing your GuixSD config in the instantiated system
  2017-08-28 16:46     ` Alex Kost
@ 2017-08-28 20:23       ` Peter Mikkelsen
  2017-08-29  8:10         ` ng0
  2017-08-29 10:13         ` Ricardo Wurmus
  0 siblings, 2 replies; 14+ messages in thread
From: Peter Mikkelsen @ 2017-08-28 20:23 UTC (permalink / raw)
  To: Alex Kost; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1776 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?

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
>
>

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Tip of the day: storing your GuixSD config in the instantiated system
  2017-08-28 20:23       ` Peter Mikkelsen
@ 2017-08-29  8:10         ` ng0
  2017-08-29  9:26           ` Peter Mikkelsen
  2017-08-29 10:13         ` Ricardo Wurmus
  1 sibling, 1 reply; 14+ messages in thread
From: ng0 @ 2017-08-29  8:10 UTC (permalink / raw)
  To: Peter Mikkelsen; +Cc: Alex Kost, help-guix

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

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: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Tip of the day: storing your GuixSD config in the instantiated system
  2017-08-29  8:10         ` ng0
@ 2017-08-29  9:26           ` Peter Mikkelsen
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Mikkelsen @ 2017-08-29  9:26 UTC (permalink / raw)
  To: Alex Kost, help-guix

[-- 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 --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Tip of the day: storing your GuixSD config in the instantiated system
  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 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
  3 siblings, 1 reply; 14+ messages in thread
From: Ricardo Wurmus @ 2017-08-29 10:10 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix


Ludovic Courtès <ludo@gnu.org> writes:

> 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.

When the system is “checked out” during boot, would it fail when
/etc/config.scm already exists?  It certainly won’t just overwrite an
existing /etc/config.scm.

Also, this $profile/etc/config.scm would be read-only.  So far we have
encouraged people to store their configuration file at /etc/config.scm.
If this service became a default then we probably should encourage
people to store their system config file template under version control
in the root user’s home directory (or similar), rather than recommending
the file to be placed in /etc.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Tip of the day: storing your GuixSD config in the instantiated system
  2017-08-28 20:23       ` Peter Mikkelsen
  2017-08-29  8:10         ` ng0
@ 2017-08-29 10:13         ` Ricardo Wurmus
  1 sibling, 0 replies; 14+ messages in thread
From: Ricardo Wurmus @ 2017-08-29 10:13 UTC (permalink / raw)
  To: Peter Mikkelsen; +Cc: Alex Kost, help-guix


Peter Mikkelsen <petermikkelsen10@gmail.com> writes:

> 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?

I don’t think we should do this.  The copy of the configuration file
used to build the system is a read-only copy in the store.  It gets
copied to /etc/config.scm on boot along with many other files from the
system profile’s “etc” directory.  On a reboot any changes to the file
are lost again.

It is clearer to let the user specify the configuration file than to
default to /etc/config.scm, which wouldn’t even be under version
control (which is what we recommend).

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Tip of the day: storing your GuixSD config in the instantiated system
  2017-08-25 20:27 Tip of the day: storing your GuixSD config in the instantiated system Ludovic Courtès
                   ` (2 preceding siblings ...)
  2017-08-29 10:10 ` Ricardo Wurmus
@ 2017-08-29 10:30 ` Andreas Enge
  2017-08-29 22:42   ` Ludovic Courtès
  3 siblings, 1 reply; 14+ messages in thread
From: Andreas Enge @ 2017-08-29 10:30 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

On Fri, Aug 25, 2017 at 10:27:47PM +0200, Ludovic Courtès wrote:
> But wait: we can already store the config file in the instantiated
> system!  Here’s how:

That is an exciting trick, thank you, Ludovic!

As for making it a "default", this could be done in two ways:
- Add it as a service to %base-services.
- Add it to the configuration templates.
I am more in favour of the first option, as it puts less clutter into
the configuration file.

As Ricardo, I do not think we should leave out the argument to
"guix system reconfigure" - this is too much automation in my opinion,
it is good if users explicitly provide their desired configuration.
And if it is only a matter of adding "/etc/config.scm" to express that
nothing has changed and that just an update of the same packages and
services is to be done, then this can be done easily now.

Andreas

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Tip of the day: storing your GuixSD config in the instantiated system
  2017-08-29 10:10 ` Ricardo Wurmus
@ 2017-08-29 22:20   ` Ludovic Courtès
  0 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2017-08-29 22:20 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

Ricardo Wurmus <rekado@elephly.net> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> 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.
>
> When the system is “checked out” during boot, would it fail when
> /etc/config.scm already exists?  It certainly won’t just overwrite an
> existing /etc/config.scm.

Right, I think it’d fail gracelessly.

> Also, this $profile/etc/config.scm would be read-only.  So far we have
> encouraged people to store their configuration file at /etc/config.scm.
> If this service became a default then we probably should encourage
> people to store their system config file template under version control
> in the root user’s home directory (or similar), rather than recommending
> the file to be placed in /etc.

Yeah, it sounds like claiming this specific name, /etc/config.scm, is
likely to cause problems.  Unless the documentation for the new service
insists on it?

And yes, we should recommend putting config files under version-control,
regardless of whether we add this new service.

Ludo’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Tip of the day: storing your GuixSD config in the instantiated system
  2017-08-29 10:30 ` Andreas Enge
@ 2017-08-29 22:42   ` Ludovic Courtès
  2017-08-30 16:07     ` Andreas Enge
  0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2017-08-29 22:42 UTC (permalink / raw)
  To: Andreas Enge; +Cc: help-guix

Andreas Enge <andreas@enge.fr> skribis:

> On Fri, Aug 25, 2017 at 10:27:47PM +0200, Ludovic Courtès wrote:
>> But wait: we can already store the config file in the instantiated
>> system!  Here’s how:
>
> That is an exciting trick, thank you, Ludovic!
>
> As for making it a "default", this could be done in two ways:
> - Add it as a service to %base-services.

This wouldn’t be possible, at least not this easily, because the trick
requires the config file name, and that means it’d typically need to be
a macro used within the config file, like:

  (define (%config-file-service file)
    (simple-service 'config-file
                    etc-service-type
                    `(("config.scm" ,file))))

  (define-syntax-rule (config-file-service)
    (%config-file-service
     (local-file (assoc-ref (current-source-location)
                            'filename))))

> - Add it to the configuration templates.
> I am more in favour of the first option, as it puts less clutter into
> the configuration file.

I’m a bit reluctant to make it part of ‘%base-services’ (if it were
technically possible) because that may deceive users, since it takes
more than this config file to reproduce a GuixSD config.

Ludo’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Tip of the day: storing your GuixSD config in the instantiated system
  2017-08-29 22:42   ` Ludovic Courtès
@ 2017-08-30 16:07     ` Andreas Enge
  2017-08-30 21:25       ` Ricardo Wurmus
  0 siblings, 1 reply; 14+ messages in thread
From: Andreas Enge @ 2017-08-30 16:07 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

On Wed, Aug 30, 2017 at 12:42:51AM +0200, Ludovic Courtès wrote:
> Andreas Enge <andreas@enge.fr> skribis:
> This wouldn’t be possible, at least not this easily, because the trick
> requires the config file name, and that means it’d typically need to be
> a macro used within the config file, like:

Okay, no problem; then I would suggest to simply add it to the templates.

If the file name poses problems as pointed out by Ricardo, a different
choice would work as well. /etc/current-config.scm? Anything, actually.

Thanks!

Andreas

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Tip of the day: storing your GuixSD config in the instantiated system
  2017-08-30 16:07     ` Andreas Enge
@ 2017-08-30 21:25       ` Ricardo Wurmus
  0 siblings, 0 replies; 14+ messages in thread
From: Ricardo Wurmus @ 2017-08-30 21:25 UTC (permalink / raw)
  To: Andreas Enge; +Cc: help-guix


Andreas Enge <andreas@enge.fr> writes:

> If the file name poses problems as pointed out by Ricardo, a different
> choice would work as well. /etc/current-config.scm? Anything, actually.

Would it be a bad idea to store it somewhere under “/etc/guix/”?
Because that directory exists.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-08-30 21:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).