From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id gCotAAOhU2Zf+QAAqHPOHw:P1 (envelope-from ) for ; Sun, 26 May 2024 22:52:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id gCotAAOhU2Zf+QAAqHPOHw (envelope-from ) for ; Sun, 26 May 2024 22:52:19 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=aFnDZhj8; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1716756738; a=rsa-sha256; cv=none; b=aOfUX+dHDuoJIkaVBulkfra/fuqqpl6fQeUJ/rXrQkSdXEWLpYhKJWh54e2AU5FYCdursN RK/4Xi8JOVxtnr8hZ2hsaQjS5THa+NHkoiQdUZ4SKHMkxelQBYJAxOWziiJHrG9KO8o5hO Q0PCrnMB3d/cRn6DdMKnJcukfOSsLRcZHAPNRDimC5POSqeIx58t6OYGwKmLbvjpAsOgww R9QEzn1Yh5vEMD3d9IemSeVr3QLiJ4zWVD4X3lPaX/9eZljBzVpyLWEJYTz+hO0L56waDY jyrt6+LrCRTXS/fNzYZFUTggCKuwT2sT3iy/UdDif5Ys2eBUrJMWwWWrcf0pvw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=aFnDZhj8; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1716756738; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=LZivtgDvcLqxRPk22IcDYVxd2fOK6RtRB1WopeRLCsk=; b=isy9zIXCZA5q2rVX3F0qI5gAH5pbqy34zM1Ez0Z8HCz044dumPZc0/np3gSIp0oSFvom60 M5PqvCsMR3TEcTsMQkqY/BJmN9p57RwSR/xrhwMYK25/ivVX8ZpW9z1TxKQWA/+JS5xThU i8HqND/MaekM7n2s88+Nv0MYKZU6GLbbmhsCb2BYhG3n1YUfdPhZuGmB2DMXH+Pxgd91TO GzZkI5fOkoxXp+ptHSaNPvj9vNdH89u3NF96K+/4IRu3x/u7egxFrGD+BYBDV7UXXSipPc abltxXR+BSPWoy+Htx4NAUPQpAI/Z49q0lyuXiN+lOv2L7nKYMCFlaEImkmwRQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BEABE3004C for ; Sun, 26 May 2024 22:52:18 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBKqM-0004qs-He; Sun, 26 May 2024 16:51:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBKqK-0004qJ-Ub for help-guix@gnu.org; Sun, 26 May 2024 16:51:48 -0400 Received: from mail-108-mta81.mxroute.com ([136.175.108.81]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sBKqJ-0004dZ-6F for help-guix@gnu.org; Sun, 26 May 2024 16:51:48 -0400 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta81.mxroute.com (ZoneMTA) with ESMTPSA id 18fb6ac6109000efce.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 26 May 2024 20:51:41 +0000 X-Zone-Loop: 95cd06e9fc560ecca357c8afe988e71a13d7d375f182 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=LZivtgDvcLqxRPk22IcDYVxd2fOK6RtRB1WopeRLCsk=; b=aFnDZhj8YQeC4yC4FeTpviAZx0 WX4h3pv0/MghmrON09T/saa0yDDtrZFgj1VNre7ys7KvKuTpIu08b20BvT5wzcRXpFZEO6zOk3JFG uRkGvnlL3jYfoMLyiTMIyrTIKrixVkOtDpO6+kcum5zarLBQ+fYjKitKGyeVrDd5qU/QcFuFxJHVf nlcNTiuhVzOzsg4mN9GYSZ3KsorQVWgDdMcAU05L7QdJH/F7gWcuBq2aBMD/AktwX/xDwgLbcZayZ tgmeRwaocT0wQWiobwVF7V9GDnVPR4XNJc3chEh06LYIZ7+Jpz5lf/nwg1oxSPu5V7gVH5+V3ocGc lQd9CqCA==; From: Richard Sent To: Marek =?utf-8?Q?Pa=C5=9Bnikowski?= Cc: help-guix@gnu.org Subject: Re: Automated /etc/config.scm In-Reply-To: <22299782.EfDdHjke4D@akashi> ("Marek =?utf-8?Q?Pa=C5=9Bnikows?= =?utf-8?Q?ki=22's?= message of "Sun, 26 May 2024 15:58:23 +0200") References: <22299782.EfDdHjke4D@akashi> Date: Sun, 26 May 2024 16:51:33 -0400 Message-ID: <87o78ss3e2.fsf@freakingpenguin.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: richard@freakingpenguin.com Received-SPF: pass client-ip=136.175.108.81; envelope-from=richard@freakingpenguin.com; helo=mail-108-mta81.mxroute.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: BEABE3004C X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -6.34 X-Spam-Score: -6.34 X-TUID: 71VZgyT82Db/ 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) use-this-system)' --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. [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 -- Take it easy, Richard Sent Making my computer weirder one commit at a time.