From: Efraim Flashner <efraim@flashner.co.il>
To: Andrew Tropin <andrew@trop.in>
Cc: 63786-done@debbugs.gnu.org
Subject: bug#63786: [PATCH] home: services: ssh: Allow unset boolean
Date: Wed, 14 Jun 2023 22:16:47 +0300 [thread overview]
Message-ID: <ZIoSH795GQcn9Llb@3900XT> (raw)
In-Reply-To: <87r0qhmg45.fsf@trop.in>
[-- Attachment #1: Type: text/plain, Size: 2010 bytes --]
On Mon, Jun 12, 2023 at 08:58:18AM +0400, Andrew Tropin wrote:
>
> A few years ago, when we were implementing the first version of ssh home
> service in rde we went a slightly different way and didn't hardcode any
> record fields and let user set an alist of key/value pairs:
> https://git.sr.ht/~abcdw/rde/tree/19c2d2f0996624eea8b7a87b14bbc31e4a9b943b/src/gnu/home-services/ssh.scm#L204
>
> It's not a perfect solution either, but quite flexible. Also, it's
> relatively easy to implement default values: we can provide
> %default-host-options and ask people to do something like this on user
> side configuration:
>
> (merge %default-host-options '((compression . #f)))
>
> Of course "asking people" won't work, so it's possible to set a default
> value of options field to %default-host-options
> https://git.sr.ht/~abcdw/rde/tree/19c2d2f0996624eea8b7a87b14bbc31e4a9b943b/src/gnu/home-services/ssh.scm#L100
> and let people override it with '((compression . #f)) or enrich with
> (merge %default-host-options '((compression . #f))).
>
> It's not a proposal or something, just sharing how it's implemented in
> rde.
I'm still undecided about the alist as a comparison. It would make it
easier to add arbitrary fields, but then I feel like maybe we should be
adding something to validate the configurations.
> P.S. Note that (gnu home-services *) modules are subject to deprecation
> and when (rde home services ssh) appear, it will have a slightly
> different interface.
I went ahead and pushed the patch. I believe that, after having added to
a .ssh/config file over a period of time, line by line or entry by
entry, people will be surprised to see a bunch of fields filled in
automatically, and with different results from what they had before.
--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2023-06-14 19:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-29 14:52 [bug#63786] [PATCH] home: services: ssh: Allow unset boolean options in ssh-config Efraim Flashner
2023-06-08 20:57 ` Ludovic Courtès
2023-06-11 7:49 ` [bug#63786] [PATCH] home: services: ssh: Allow unset boolean Efraim Flashner
2023-06-12 4:58 ` Andrew Tropin
2023-06-14 19:16 ` Efraim Flashner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZIoSH795GQcn9Llb@3900XT \
--to=efraim@flashner.co.il \
--cc=63786-done@debbugs.gnu.org \
--cc=andrew@trop.in \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).