all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Larsson <david.larsson@selfhosted.xyz>
To: help-guix@gnu.org
Subject: Re: Automated /etc/config.scm
Date: Sun, 26 May 2024 20:03:24 +0200	[thread overview]
Message-ID: <20D09A2B-5A17-4CE3-BC0F-8A1C3412D80F@selfhosted.xyz> (raw)
In-Reply-To: <22299782.EfDdHjke4D@akashi>

Hi Marek,

I think its not possible to have guix pull edit /etc/config.scm without modifying how that command behaves in guix.

But it is possible to edit /etc/config.scm when running guix system reconfigure, by using a service as described here:
 https://lists.gnu.org/archive/html/help-guix/2017-08/msg00095.html

Though perhaps that's not exactly the answer you are looking for?

If you want to be able to push new configs to some channel git repo and have that reflected in a target host after a guix pull + reconfigure from the host, then I can suggest adding system configuration variables in the channel referring to the various systems you want to deploy. Then adding minimal config.scm files on the deploy targets. Those config.scm files can have '(use-module (mychannel my-systems))' or similar, and then just '%my-os-system1', etc on the final line.

I hope it helps, but not sure.

Regards,
David


On May 26, 2024 3:58:23 PM GMT+02:00, "Marek Paśnikowski" <marek@marekpasnikowski.pl> wrote:
>While pursuing a solution to another problem I saw some documentation which 
>inspired me to question whether it is possible to have an operating-system 
>configuration which injects itself into the /etc/config.scm file.
>
>Currently the content of my /etc/config.scm file reflects the state of system 
>upon installation, as I had always used my git repository to manage the system 
>configuration files.
>
>I have already built the infrastructure to host my configurations on my home 
>server.  I would like now to ditch the configuration repositories' clones in 
>the home directories on my computers and rely entirely on the combination of 
>the system-wide channels (this I have implemented) and the /etc/config.scm 
>file.
>
>Is there a way to have 'guix pull' edit the /etc/config.scm file to mirror the 
>designated system configuration file? I assume that any module imports are 
>handled by an existing guix infrastructure, because I had no need to use the
>-L switch during reconfigurations for a while.

  reply	other threads:[~2024-05-26 18:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-26 13:58 Automated /etc/config.scm Marek Paśnikowski
2024-05-26 18:03 ` David Larsson [this message]
2024-05-26 18:41   ` Marek Paśnikowski
2024-05-26 20:51 ` Richard Sent
2024-05-27  3:41   ` Marek Paśnikowski
2024-05-27 16:31     ` Richard Sent

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=20D09A2B-5A17-4CE3-BC0F-8A1C3412D80F@selfhosted.xyz \
    --to=david.larsson@selfhosted.xyz \
    --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.