[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#55055] Fwd: [bug#55055] [PATCH] gnu: wireguard: Add support for Pre
From: |
Maxime Devos |
Subject: |
[bug#55055] Fwd: [bug#55055] [PATCH] gnu: wireguard: Add support for PresharedKey |
Date: |
Thu, 21 Apr 2022 23:59:40 +0200 |
User-agent: |
Evolution 3.38.3-1 |
Paul Alesius schreef op do 21-04-2022 om 22:41 [+0200]:
> > Also, #f is not a string, did you mean ‘;#f|string’?
>
> The idea behind #f is that the field is optional, so that if it isn't
> specified in the configuration then it isn't written to the
> configuration file at all, hence #f is for a conditional when writing
> the actual configuration file and has no default value.
It's optional in the generated wireguard configuration file, but not in
the Guix record -- Guile records don't have a concept of optional
fields, though there are fields with default values.
Though apparently conventions are a bit inconsistent in Guix on this
matter. wireguard-configuration just does ;string, but <agetty-
configuration> does
(define-record-type* <agetty-configuration>
[...]
(tty agetty-configuration-tty) ;string | #f
(term agetty-term ;string | #f
(default #f))
(baud-rate agetty-baud-rate ;string | #f
(default #f))
(auto-login agetty-auto-login ;list of strings | #f
(default #f))
[...]
Greetings,
Maxime.
signature.asc
Description: This is a digitally signed message part