guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46504: [PATCH] services: wireguard: New service.


From: Mathieu Othacehe
Subject: bug#46504: [PATCH] services: wireguard: New service.
Date: Wed, 17 Feb 2021 10:38:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hello Brice,

> Cool, more intergration of Wireguard in Guix! I started wiriting such a
> service but didn't finialized it yet. Tho, I wasn't sure if it needed to
> be implemented with wg-quick since upstream describe it as « a very
> quick and dirty bash script for reading a few extra variables from
> wg(8)-style configuration files, and automatically configures the
> interface »¹.

Yeah, this made me hesitate too. However, I think that having this small
service is always better than a raw configuration file. It would of
course be nice to have a more complete service, maybe relying on
Guile-Netlink in the future.

> wg-quick(8) say that the ”Address” attribute can be specified multiple
> times and is  « a comma-separated list of IP (v4 or v6) addresses
> (optionally with CIDR masks) to be assigned to  the interface. », so the
> “address” field should probably be “addresses”, a list of string.

You're right, fixed.

> Some of the missing attributes from wg-quick(8) like “DNS” or hooks
> seems realy usefull, maybe a “extra-config” field to the record could be
> added to support all of thoses attributes.

Yes, I'll add it as a follow-up.

> Why having a “public-key” field since it is derived from the private
> key?  It seems to allow missconfiguration: what happen if the private
> and public part of a key don't match, or if only the “public-key” is
> set?

The rationale was that when the private key is generated, the user can
just "cat /etc/wireguard/public.key" instead of running "wg pubkey <
/etc/wireguard/private.key" but I agree it is misleading and I removed
this field.

I pushed the revised patch as 43b2e440c38a39eb64088bd6c08771c060aa10fc.

Thanks,

Mathieu





reply via email to

[Prev in Thread] Current Thread [Next in Thread]