[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automated /etc/config.scm

From: David Larsson
Subject: Re: Automated /etc/config.scm
Date: Sun, 26 May 2024 20:03:24 +0200

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:

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.


On May 26, 2024 3:58:23 PM GMT+02:00, "Marek Paśnikowski" 
<> 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 
>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 via email to

[Prev in Thread] Current Thread [Next in Thread]