all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Marek Paśnikowski" <marek@marekpasnikowski.pl>
To: help-guix@gnu.org
Subject: Re: Automated /etc/config.scm
Date: Mon, 27 May 2024 05:41:02 +0200	[thread overview]
Message-ID: <2392297.NG923GbCHz@akashi> (raw)
In-Reply-To: <87o78ss3e2.fsf@freakingpenguin.com>

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

26.05.2024 22:51:33 CEST Richard Sent:
> 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.
>
> 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)
> use-this-system)'
> --8<---------------cut here---------------end--------------->8---

Yes! This is exactly what I hoped for! Thank you very much.  For anyone 
reading this in the future: the code is '(@ module-name procedure-name)'.
The operating-system record needs to be named with a define-public.

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

Sounds lovely, but I would need to construct a continuous integration 
subsystem to be to able to use it.  I tend to experiment a lot while 
programming and I do not trust myself to just upgrade automatically to the 
newest revision of my code.  Most of my reconfigures fail, due to any number 
of reasons.

Now I really need to come up with a nice channel / distribution name.  The 
number of modules in my codebase is about to explode and I can already tell 
that renaming them after the fact would be… painful and tedious.

> [1]:
> https://git.sr.ht/~freakingpenguin/rsent/tree/
1b79ec8a91a9546d4cc158590b1d50145e5fe42a/item/rsent/machines/droplets/
rampart.scm#L69
> [2]:
> https://git.sr.ht/~freakingpenguin/rsent/tree/
1b79ec8a91a9546d4cc158590b1d50145e5fe42a/item/rsent/configs/channel.scm#L13


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-05-27  3:41 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
2024-05-26 18:41   ` Marek Paśnikowski
2024-05-26 20:51 ` Richard Sent
2024-05-27  3:41   ` Marek Paśnikowski [this message]
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=2392297.NG923GbCHz@akashi \
    --to=marek@marekpasnikowski.pl \
    --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.