[Top][All Lists]

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

Re: Automated /etc/config.scm

From: Richard Sent
Subject: Re: Automated /etc/config.scm
Date: Sun, 26 May 2024 16:51:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Marek!

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

The relevance of the below answer depends on if the contents of
/etc/config.scm are tracked in your custom channel. If not, I
misunderstood and feel free to disregard. :)

If your channel includes the configuration files for the target
machines and you are successfully adding those channels to the system,
you could take advantage of Guix's -e flag. e.g.

--8<---------------cut here---------------start------------->8---
$ guix system reconfigure -e '(@ (my-custom-channel machines this-machine) 
--8<---------------cut here---------------end--------------->8---

This would reconfigure your system using the version of
'my-custom-channel' as described by $ guix describe. So run guix pull,
then the above command, and you can skip needing to separately update
clone of your channel in your home directory.

You can even go one step further.

When combined with unattended-upgrade-service-type [1] and embeddeding a
"self-referential" channels.scm file in your configuration [2] (a
channels.scm file that contains it's own repository), your systems would
regularly reconfigure themselves using the newest versions of your
channel machine configuration files.


Take it easy,
Richard Sent
Making my computer weirder one commit at a time.

reply via email to

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