From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id qEHCJvMaGWdUdQAAqHPOHw:P1 (envelope-from ) for ; Wed, 23 Oct 2024 15:49:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id qEHCJvMaGWdUdQAAqHPOHw (envelope-from ) for ; Wed, 23 Oct 2024 17:49:07 +0200 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=essGNIno; dkim=fail ("headers rsa verify failed") header.d=freakingpenguin.com header.s=x header.b=Geq9MMFo; dmarc=none; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1729698547; a=rsa-sha256; cv=none; b=lH1MFN08Z+whrYdMxFGz9i2gNyUMtlIhutcycxPNE67luxmwPLUk1DcmbpKhE1siAwdbd4 YLbX3i9jhWVp8jQTAmQvhNbK84WNTbXnHWzABs/gnm7Gh3WJKEycM5eGJ3irCMz8U8mqkw 9zhTHlkRoTx86I7zA4jl6rvOCkpwH5gHxEy5bj4IfhRKihCK//2iBXYvWqxROpG0Cj9m5z cOoWjFX+AtIYJNQDumRuB9v6ZAg9eT54MvavY1Jel9/JXBlvcSVUdzM36GKaLKx/8Y7aYe +bnbrbcx/4IIc7y6rgb63Nf/VOgH6ku4lLcwR0UR/WLlok8SbtZW8YmbAbOLsw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=essGNIno; dkim=fail ("headers rsa verify failed") header.d=freakingpenguin.com header.s=x header.b=Geq9MMFo; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1729698547; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=n7Ub4zzSt0tnvDelKnnE8EtbYOAQA7nJwtgPobmIPhE=; b=SMaja52nUk2Cajl72uukhu1ObQtQm1pi/sxBVQSzbWmjKEBDcrSjx6YnE5V3iwa2yQgx0w oaWLkjlYxrkh2J8+nguYFIXhVLo77Sg0+7cQysU/Fa7TlpDtOW040ty2x937ST4KiPTCrG LVwiVbnj7sIwKinE/ljHWDuRMSwP9C062bu8q7Qm4m4bU74fg1AhOI4b8cUmA50Vikfe65 MN/V6r8G9kgk5YPG/y64pPZgXmu3Pf5TZ8tAFK6ySr2gRYiM2wMI1LJwQyJ6iHSZiA2u04 Yp3aG6TTIrPsuFR0mlYGFGNdK0l5i+SDB5Y2uswZp88mG9suVDLqGi80P0iL0w== 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 75EB279EF0 for ; Wed, 23 Oct 2024 17:49:07 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3db9-0003Lo-My; Wed, 23 Oct 2024 11:48:35 -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 1t3db7-0003L4-Q2 for guix-patches@gnu.org; Wed, 23 Oct 2024 11:48:34 -0400 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 1t3db7-0000cf-CL; Wed, 23 Oct 2024 11:48:33 -0400 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:From:To:In-Reply-To:References:Subject; bh=n7Ub4zzSt0tnvDelKnnE8EtbYOAQA7nJwtgPobmIPhE=; b=essGNInoEJUD7W0s6hjQRO1ha1sH2Rfp+Naoxy+3ypMTQkP2lvsWs7FRp8TyNINgaFakyR79mWO+cTxIGuApglZSixTVsdXWNVKOBC3LIPoJrH9OfSLsiPRbEw0JHDwYPrXxZJqmF5NLRw5lCcgy7KmWaoI5afcCt9tg8xtBYIsRq4c3bjo2SEuuy/B9po3HR6GpBRAimMcyGA9sm3A2YLzFfsezkZosf42zC5EVBheoLQI90A16SDdYGogXs4R1nnYra2bDws6HZe+O9X+hoiHGN5tqBpYYdAtsWVr2kjEWAiTlEP8jiKw7vlyjclBxhUixrjMI3jEKb78kjzX45w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t3dba-0002BY-Kz; Wed, 23 Oct 2024 11:49:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73955] [PATCH v2 0/2] Improve customizability in WireGuard service References: In-Reply-To: Resent-From: Richard Sent Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Wed, 23 Oct 2024 15:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73955 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73955@debbugs.gnu.org Cc: othacehe@gnu.org, Richard Sent , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-Xcc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 73955-submit@debbugs.gnu.org id=B73955.17296984908315 (code B ref 73955); Wed, 23 Oct 2024 15:49:02 +0000 Received: (at 73955) by debbugs.gnu.org; 23 Oct 2024 15:48:10 +0000 Received: from localhost ([127.0.0.1]:60455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3dak-0002A2-10 for submit@debbugs.gnu.org; Wed, 23 Oct 2024 11:48:10 -0400 Received: from mail-108-mta131.mxroute.com ([136.175.108.131]:32967) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3dah-00029s-UO for 73955@debbugs.gnu.org; Wed, 23 Oct 2024 11:48:08 -0400 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta131.mxroute.com (ZoneMTA) with ESMTPSA id 192ba0fddf60003e01.001 for <73955@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 23 Oct 2024 15:47:35 +0000 X-Zone-Loop: 68e2fae0c90fe29678510bd1fc13483a997b7d1c1a0e 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-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=n7Ub4zzSt0tnvDelKnnE8EtbYOAQA7nJwtgPobmIPhE=; b=Geq9MMFoxXBl14LjAXSkcvczKZ VQMCvHMghMXDQ6wFv+CT5U8CtZlIhdHicNOdpCtVddazO8HvGo3XP8DfxHFs8FRtV8EA3pfCaMKSi fyq/AFYu1M4bCztdJH50x7BL1fsH5HnMrfXwcnQuiQh5PbQeU3DhFyBoedvQvm9mr5dokhIKv7Lhy PWFeBTRMnS9vHVKgsXImUVT67xfsvEY5sYPBwkxMNDXavkDO7lz3uhcQTFMqaSqPtdS0oZjY+TPC0 5FdtEt1WMM06uKeKvuWbEgmtOFQHHo4cSz/XoVRe7dtSh6TDtY+7bHQBiKg+hqkEwsNrRkrDM/0TJ BhxvsHRQ==; From: Richard Sent Date: Wed, 23 Oct 2024 11:30:05 -0400 Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated-Id: richard@freakingpenguin.com 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.76 X-Spam-Score: -2.76 X-Migadu-Queue-Id: 75EB279EF0 X-Migadu-Scanner: mx10.migadu.com X-TUID: hHN4/Oaqv2IU Hi all, Thanks for the quick review Mathieu! This patch is largely the same as before, but I spent some time adjusting the documentation and adding an example of retrieving the private key programmatically. One interesting tidbit is pre-up and pals can alternatively be wrapped in the gexp directly instead of each entry being gexp'd individually. > ;; normal > (pre-up (list #~(string-append "wg set %i private-key <(" > #$(file-append password-store "/bin/pass") > " WireGuard/private-keys/%i)"))) > > ;; alternative > (pre-up #~((string-append "wg set %i private-key <(" > #$(file-append password-store "/bin/pass") > " WireGuard/private-keys/%i)"))) I see why this works (and it should work with any other service that handles config lists with splicing+list wrapping), but it does feel a little bit odd. Seeing as how no other service seems to use the alternative form, I opted to document the former. Richard Sent (2): services: wireguard: Make the private-key field optional. services: wireguard: Support lists of gexps for most fields. doc/guix.texi | 36 ++++++++++++++++----- gnu/services/vpn.scm | 75 +++++++++++++++++++++++--------------------- 2 files changed, 69 insertions(+), 42 deletions(-) base-commit: bd26815cf8ce38a3b03676a6e3fc482bb74247cb -- 2.46.0