From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id qK3UIJIBgGdCIwEA62LTzQ:P1 (envelope-from ) for ; Thu, 09 Jan 2025 17:04:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id qK3UIJIBgGdCIwEA62LTzQ (envelope-from ) for ; Thu, 09 Jan 2025 18:04:18 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="NfPEQ/3y"; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=YdMeflqB; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1736442258; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Af0dWIk9laaEL3ETaob4BC+44JiUe0zN2G8oUW/INok=; b=jnHLGtDtS6s6gImuekEhojhBLrPtUSQKrHR9T/fIT71L6YMBIeFu3x2p0OPOyB+5In/TMr FbFamlOC2rckreGrEXGdC5qSfmlriDlgAZvXSLq5ZhkCUDMCRUbFNQ5E/B16L+KsZHZhlk II+A4KPklmihlnDD3i1TZD9ee+IXLq9cA04eWXGiZFNMR6IhoUgTVzu7nAARD3wgp+dwqd sOJJxcxoagilxdfDksSi6Lsz8WVkCaoIjzV3D9WbpdZeuUyNer2bKg43Sn378SLr941zIC NMv0rD/1Isvv+nEzAYkdjO/ALUPKxCMhJG1ytcELRrNh7vHmpS4bpIVLh6w9Tg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="NfPEQ/3y"; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=YdMeflqB; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736442258; a=rsa-sha256; cv=none; b=BQY3ZDvSW0Qx6YZpnTapcH9hyEoi934pFaThW0rF6lvpX8MjuQfgpYp00k8SA3XRBqmf5v 1FyCm8zFetHHmxoqQ5u1YzSh95QrCSfCJSHc3IrI5Ab49GJKL/yBC87cMYOBOp735i8AeY XDSWwbBz/gdcc81I7cuH5yGnbYjOnPVZ3t9oiACT1Gr6LDqWGgf1QwHDshlAfgKacWhazF PfpV2m6Xn5y4nBwFcFDSdAwdNnDEGJHvNO+mLE2+VxjAlqvR0K4v/7qzjjSGW8lUbXwLcO wfl1x+u/mrw+jda1FphNFB2wyfaDBhstAH056R2umTYV5tNl8kqWDD/Vi2Snnw== 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 0801B1C14F for ; Thu, 09 Jan 2025 18:04:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVvwy-00041S-2X; Thu, 09 Jan 2025 12:04:04 -0500 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 1tVvww-00041D-RH for guix-patches@gnu.org; Thu, 09 Jan 2025 12:04:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVvww-000663-As for guix-patches@gnu.org; Thu, 09 Jan 2025 12:04:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=Af0dWIk9laaEL3ETaob4BC+44JiUe0zN2G8oUW/INok=; b=NfPEQ/3yQxrX4AQ+TgnE47Ed2nvJq/JHerhB1194CS9uOdi6aTrUtgiSNa3E6ehI3Dkw+PipatVpQf8Z4O0gcNsvNUg4eupck451x2okulNU7GH0auiEF+25yTpvTWG++mUgFnquFsW3ElzWc0XPTshJ7gBRa9chp4I5DmYWL58WWAnA37YJHq4BX4zkOg/K8wfftdl93Tnfn+vPZuGoGhksYtVhR/cV89JnRt5Wf4yohg9nuJacXg6eRFjMysXjmDFmAU/7OI2c2BSn3eKWTWKGjKWLv7Mwp+02ZmRJk+tgjuUG+kSdCChS2iDHf2MAUDK1z2hONaqP5fgLgYab1A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVvwv-0002bq-QZ for guix-patches@gnu.org; Thu, 09 Jan 2025 12:04:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75145] [PATCH v2 0/1] services: network-manager: Add extra-configuration-files field. Resent-From: 45mg <45mg.writes@gmail.com> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 Jan 2025 17:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75145 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Arnaud Daby-Seesaram , 45mg <45mg.writes@gmail.com> Cc: guix-devel@gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer , 75145@debbugs.gnu.org Received: via spool by 75145-submit@debbugs.gnu.org id=B75145.17364422119986 (code B ref 75145); Thu, 09 Jan 2025 17:04:01 +0000 Received: (at 75145) by debbugs.gnu.org; 9 Jan 2025 17:03:31 +0000 Received: from localhost ([127.0.0.1]:54067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVvwQ-0002b0-VI for submit@debbugs.gnu.org; Thu, 09 Jan 2025 12:03:31 -0500 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]:47301) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <45mg.writes@gmail.com>) id 1tVvwO-0002af-Ig for 75145@debbugs.gnu.org; Thu, 09 Jan 2025 12:03:29 -0500 Received: by mail-pj1-x1041.google.com with SMTP id 98e67ed59e1d1-2f43da61ba9so1587364a91.2 for <75145@debbugs.gnu.org>; Thu, 09 Jan 2025 09:03:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736442202; x=1737047002; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Af0dWIk9laaEL3ETaob4BC+44JiUe0zN2G8oUW/INok=; b=YdMeflqBkYOYLpsUArj8kTpMMTmQw/9Oy9CRw1vDvzaNqaNNPeqH43aJ7+tv39yhJr D6Wt+Yr19P5NsS7IcowY6X7yEzTlF5tTwFl1P1KjRUzrKiDsYY15+gmIbm1xQre61L/v ucK+aXQw+5QRLmkS1nTejg8f0Ineyhw5Myv64uQ0clCM3Gp0aRo2kDgDyysOBHGRwOY8 nfotMC+VSt5zvsfI7N/Cq3rsuvmWNUELU61lMzWYfOTr34LIWAecfaG/yyRdWbiocjZ6 gkFoFZ8N2LUn3VYWz0tsEYFoOKpzei6VzsBJlUCSaEA6ZVYEdTxOmQXNxf1CLjdd87Im H11A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736442202; x=1737047002; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Af0dWIk9laaEL3ETaob4BC+44JiUe0zN2G8oUW/INok=; b=RJckiLDSNf3xqVRDMcxs++36LN+PRyzwS4GEPMwXoR467ofWJ4jr5ZH50pdcZnmWZj gR/yPjo5f0BQTPIDU14RvGKswyPr69ZaPlmym4i4/t2J47k2WTaIShLfSR1Jdu5+dNtZ rK2pCpIFeEfdMhK7POS2K5D+PdpLGjSf627OBxonG/UzrQB1pFF4B1G1IwYKTM0N/tf1 W/9NqcVZAgwHFEz842FhEE1m0V5z0oh6r+5+TaJ7QeaKrPkyR3eoXH0SL4g2cEx/OIEb ygQUT+XgiyMvawwmsYDysH3fDLnkZSIr0se7UlA5d+xDDHwCR6fjz04Tb1XErfY9rqGW Tfag== X-Gm-Message-State: AOJu0YyyowqnJMhF3YZtm2YSUoyowSDOmwoFMPATWEPry2q5BhU4wNT+ D+e0iIGtYs2ZgMJM9PrXtW3FZrfcurTVV5u7e5CTnx4RUk0hlRan X-Gm-Gg: ASbGncs4siFjIW3MXH3bjmpJhpyGa0lcJPjRUJ08aoWC1j7R/AIkTvcG9eF4yYpntbZ zEeODT/+g77YkfMbJ18fGytx01HxO7+zG9b8HdlyISi0M1vgE4QQoTuIhA2K6W+5byOZQ2XXjRP XhuDekGUrEbNQkJaFyTOpF2EGku76bplsgQasgbSU4uSez/OzZYmTEPdBpWFLFa5hrVSe4aSCH9 sMxxTnd80mWYh3KhpOX+25d19XjhW6zZL9vO3DnLWcTJAspPMyRzaeE1g== X-Google-Smtp-Source: AGHT+IGFsHin18QOUVsNZWfJRAAjarqsXJ7titOvO1S/b2UsXazF3u8zHBMXvUvxbMT9xJA8crSBlw== X-Received: by 2002:a17:90b:4d0c:b0:2ee:8619:210b with SMTP id 98e67ed59e1d1-2f5490bd21dmr11050861a91.29.1736442201958; Thu, 09 Jan 2025 09:03:21 -0800 (PST) Received: from guix0 (utm3.nitt.edu. [14.139.162.2]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f5593d08a8sm1802511a91.9.2025.01.09.09.03.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jan 2025 09:03:21 -0800 (PST) From: 45mg <45mg.writes@gmail.com> In-Reply-To: <875xmo11ys.fsf@nanein.fr> References: <7743f403ebf1693fc386a397e9aed1975b43f900.1735323486.git.45mg.writes@gmail.com> <875xmo11ys.fsf@nanein.fr> Date: Thu, 09 Jan 2025 12:03:13 -0500 Message-ID: <87jzb3zzqm.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: 2.20 X-Spam-Score: 2.20 X-Migadu-Queue-Id: 0801B1C14F X-TUID: GmE9BwvzUqgh Hi Arnaud! Arnaud Daby-Seesaram writes: > Adding a default configuration could one day be interesting. However, > I=C2=A0would rather (personal opinion) see the default value in an export= ed > variable %default-networkmanager-files (non-contractual name) if needed. > This variable could become the default value of the field. > > This way, it would be more transparent to users, and would enable them > to easily opt-out. Adding their files could be done with the following > configuration: > > --8<---------------cut here---------------start------------->8--- > (extra-configuration-files > (cons* `("file1" ,(plain-file ...)) > ... > %default-networkmanager-files)) > --8<---------------cut here---------------end--------------->8--- Yes, I think I agree. Of course, it's a moot point for now since we don't have any use for such a variable yet, but it seems like a good approach. > As you said, you are doing something similar to `etc-service-type'. Is > there a reason not to extend [2] it directly (e.g.=C2=A0like > `greetd-service-type' does in `(gnu services base)')? > > You could, for example, prepend "NetworkManager/conf.d/" to file names > and pass the value to `etc-service-type'. WDYT? That's a good suggestion! I don't know why it didn't occur to me. So I tried it; the problem is that if I pass something like this: --8<---------------cut here---------------start------------->8--- (service-extension etc-service-type (lambda (config) `(("NetworkManager/conf.d" ,(network-manager-configuration-directory config)))= )) --8<---------------cut here---------------end--------------->8--- ...then I get this error when creating a container: --8<---------------cut here---------------start------------->8--- ERROR: In procedure primitive-load: In procedure mkdir: Read-only file system --8<---------------cut here---------------end--------------->8--- It looks like this is because of this line in `network-manager-activation`: --8<---------------cut here---------------start------------->8--- (mkdir-p "/etc/NetworkManager/system-connections") --8<---------------cut here---------------end--------------->8--- When we use `etc-service-type`, "/etc/NetworkManager" becomes a symlink to "/etc/static/NetworkManager"; and "/etc/static" is a symlink to the result of building the derivation returned by `etc-entry` (see (gnu services)). And derivations are in the store, which is read-only. So we can't create "/etc/NetworkManager/system-connections/". And this won't do, since NetworkManager itself needs to be able to write to that directory to manage saved connections. So it looks like that won't work. > Would it make sense to allow the NetworkManager service to be extended? > (E.g to allow another service to add a configuration file.) > > Note: this is not a blocker for your patch and could be done in a later > patch. It is simply a thought that I wanted to share. Yeah, this was another reason for this revision. Again, it's not actually something we need right now; it's just worth leaving open as a possibility.