GNU bug report logs - #73955
[PATCH 0/2] Improve customizability of WireGuard service

Previous Next

Package: guix-patches;

Reported by: Richard Sent <richard <at> freakingpenguin.com>

Date: Tue, 22 Oct 2024 21:25:02 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 73955 <at> debbugs.gnu.org (full text, mbox):

From: Richard Sent <richard <at> freakingpenguin.com>
To: 73955 <at> debbugs.gnu.org
Cc: othacehe <at> gnu.org, Richard Sent <richard <at> freakingpenguin.com>
Subject: [PATCH v2 0/2] Improve customizability in WireGuard service
Date: Wed, 23 Oct 2024 11:30:05 -0400
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





This bug report was last modified 169 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.