From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QNnUFrwS1WBNxwAAgWs5BA (envelope-from ) for ; Fri, 25 Jun 2021 01:18:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id eFJ9ErwS1WBCcwAA1q6Kng (envelope-from ) for ; Thu, 24 Jun 2021 23:18:20 +0000 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 C69251D20D for ; Fri, 25 Jun 2021 01:18:15 +0200 (CEST) Received: from localhost ([::1]:39784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwYbu-0003AG-OI for larch@yhetil.org; Thu, 24 Jun 2021 19:18:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwYbi-00032T-Ku for guix-patches@gnu.org; Thu, 24 Jun 2021 19:18:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwYbi-0007MU-Dw for guix-patches@gnu.org; Thu, 24 Jun 2021 19:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lwYbi-0000Pa-B7 for guix-patches@gnu.org; Thu, 24 Jun 2021 19:18:02 -0400 Subject: bug#48803: [PATCH] gnu: Add strongswan service. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Thu, 24 Jun 2021 23:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 48803 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Domagoj Stolfa Cc: 48803-done@debbugs.gnu.org, guix-patches@gnu.org Mail-Followup-To: 48803@debbugs.gnu.org, me@tobias.gr, ds815@gmx.com Received: via spool by 48803-done@debbugs.gnu.org id=D48803.16245766711539 (code D ref 48803); Thu, 24 Jun 2021 23:18:02 +0000 Received: (at 48803-done) by debbugs.gnu.org; 24 Jun 2021 23:17:51 +0000 Received: from localhost ([127.0.0.1]:44302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwYbX-0000Ol-9H for submit@debbugs.gnu.org; Thu, 24 Jun 2021 19:17:51 -0400 Received: from tobias.gr ([80.241.217.52]:49124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwYbS-0000OW-ED for 48803-done@debbugs.gnu.org; Thu, 24 Jun 2021 19:17:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=73MzUksfwnf77 eCVHEDpgVZo6b6uwRCpkZY7OY+uTcE=; h=date:in-reply-to:subject:cc:to: from:references; d=tobias.gr; b=fXBCRJ+DwFO8ZP+NXmvn8Mwwg6zZcsHbCSh1tl yzgbrva8HOQ4rDSidkAm0gF5ZoYqSaBsbkNXqSw2BkHrbeDbuBZ2XDLx9/FoZY6aEuOOpL H/OCYTyG9M367v5a7YD4TvoK9TVBZjMCXY1oMaI3yh3G3ee8llIokR2sAtScswrNDb1dYf YeMF5Jng2+AruPKqbLOMHU6anB8rHReWyMo9Qz2igSPiQaBwR8DO+CRvvJceKrGj4m2HGh LRPRH63FcV9jHLc1Jrxiuz1jq+sAFJnZmZF/jwmKp3v7IWKXI3/K6p5geKD+zwVGGOPs/l Y+uYr9GmmH7Pon3oejKiKzvQ== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 3bc1e568 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Thu, 24 Jun 2021 23:17:42 +0000 (UTC) References: In-reply-to: BIMI-Selector: v=BIMI1; s=default; Date: Fri, 25 Jun 2021 01:17:43 +0200 Message-ID: <87r1gqsvhk.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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" Reply-to: Tobias Geerinckx-Rice X-ACL-Warn: , Tobias Geerinckx-Rice via Guix-patches From: Tobias Geerinckx-Rice via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624576695; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-to: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=73MzUksfwnf77eCVHEDpgVZo6b6uwRCpkZY7OY+uTcE=; b=HiQcO8O3eLY+pxr2U+sH4tgKPY/XD00FJv/GYf1QBia/IoIeLEx05Wq4lvw4gkGAUR+uKR JOGDsEwrcsfsgieq5ZGSyUI2M8HKC75jy9upiuXYM6ioZkTzX0qR0eth5VkW5aOpMsvYzJ cDtUC5dyQjlUPyShLY8EwUiMvsxL70kvpsZT6DWuDeKFhgmzNGpwVtVYju9jjqXnQNjNpi UmJpUeuP4Atqq9LgtXaukfiZ/WmXaC4A+muucoHQkhiGaRFqPWAiYnpodZf9ebyx+++E/6 VkQNYvvueneRqm51UoF9wC6+X7Sq71w7ORKqv0AzQLVAa0vKiwtfO0EjcUEw9w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624576695; a=rsa-sha256; cv=none; b=P1ls9yRaR4hljvo0tPRZrQSfaiPLYzK9HRjRf9qZsz67LWAAHcpkWeP/GybE9eT/v+Sm3a 7R1WY0YHSKHhIIZSGNsnhpYcAY+l0MLqnGza++t/vvLb894DwCb3sjH4RaSE2x8Zz7cTvZ u2dnO1DkQGKavB8VYZMdbffKYRLDVhFlSEorH1oXD2vPN4L6Gr6CZDYWlwGoJ6dOlxdOTY 0lRZilIklekjxFIhAIF+u7rL+vPFgykCzHXPHSmpdAeRDz9ZXpXfLrcBiqM02VNDHJbiQK r9Y2vllOpaJHIqVjEZslOXT8jWgEkBB839A0weYj84/C/2QPmDhvjFSyitMlAQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tobias.gr header.s=2018 header.b=fXBCRJ+D; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -4.53 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tobias.gr header.s=2018 header.b=fXBCRJ+D; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: C69251D20D X-Spam-Score: -4.53 X-Migadu-Scanner: scn1.migadu.com X-TUID: 4aDS2NUQrzCw --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Domagoj! This is finally on master with the following changes: Domagoj Stolfa =E5=86=99=E9=81=93=EF=BC=9A > * gnu/services/vpn.scm (strongswan-configuration): New record=20 > type. > (charon-plugins, strongswan-configuration-file) > (strongswan-shepherd-service, strongswan-service-type): New=20 > variables. I don't know where this extra spacing came from but removed it. > +@subheading StrongSwan I'm sure some style guides disapprove, but I changed all usage of=20 =E2=80=98StrongSwan=E2=80=99 to upstream's =E2=80=98strongSwan=E2=80=99. > +Currently, the StrongSwan service only provides legacy-style=20 > configuration with > +ipsec.conf and ipsec.secrets files. We have cool @file{} mark up so I used it. > +@defvr {Scheme Variable} strongswan-service-type > +A service type for StrongSwan configuration. Added a very brief =E2=80=98IPsec VPN=E2=80=99 context. > +@lisp > +(service strongswan-service-type > + (strongswan-configuration > + (ipsec-conf "/etc/ipsec.conf") > + (ipsec-secrets "/etc/ipsec.secrets"))) Fixed the indentation. > +@item @code{ipsec-conf} (default: @code{#f}) > +The path to an ipsec.conf file. If set to @code{#f},=20 > @code{ipsec-secrets} will > +also be ignored. Reworded this to match the exception I added below. Added moar=20 @file{}. > @c %end of automatic openvpn-server documentation This indicates that the author of the previous OpenVPN section=20 automated the docs somehow. I moved it back. > @subsubheading Wireguard > diff --git a/gnu/services/vpn.scm b/gnu/services/vpn.scm > index 2bcbf76727..691cc3c05a 100644 > --- a/gnu/services/vpn.scm > +++ b/gnu/services/vpn.scm > @@ -26,6 +26,7 @@ > #:use-module (gnu services shepherd) > #:use-module (gnu system shadow) > #:use-module (gnu packages admin) > + #:use-module (gnu packages networking) Oops, noticed this only now=E2=80=A6 I don't think it's needed anymore.=20 Can you confirm? =E2=80=98guix system=E2=80=99 & friends will now throw an inelegant error i= f=20 ipsec-conf & ipsec-secrets are incongruent. I couldn't get=20 meaningful location data out of CONFIG. This does the job: + (throw 'error + (G_ "strongSwan ipsec-conf and ipsec-secrets must=20 \ +both be (un)set"))))) > +(define strongswan-service-type > + (service-type > + (name 'strongswan) > + (extensions > + (list (service-extension shepherd-root-service-type > + strongswan-shepherd-service))))) I added a default-value so people can simply write (service strongswan-service-type) and a short description. Thank you very much! T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYNUSlw0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15fYsBANgZkj+O/7JhdlZQgQTOsxkiMG9PfVWWTMD0xBS2 cXAuAQDtw5b9UqPSdJjvu1+M1RDO1mEY3nzK+YGHkkjFyDcPCw== =2rHS -----END PGP SIGNATURE----- --=-=-=--