unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Sergey Trofimov <sarg@sarg.org.ru>
Cc: paren@disroot.org, 62401@debbugs.gnu.org, andrew@trop.in
Subject: [bug#62401] [PATCH] home: Add home-syncthing-service-type.
Date: Tue, 28 Mar 2023 17:58:15 +0200	[thread overview]
Message-ID: <87o7ocg960.fsf@gnu.org> (raw)
In-Reply-To: <20230323081026.13850-1-sarg@sarg.org.ru> (Sergey Trofimov's message of "Thu, 23 Mar 2023 09:10:26 +0100")

Hi,

Sergey Trofimov <sarg@sarg.org.ru> skribis:

> * gnu/home/services/syncthing.scm
> (home-syncthing-service-type): New variable.
> (home-syncthing-configuration): New procedure.
> * gnu/services/syncthing.scm
> (syncthing-shepherd-service): Adapt to be used as a home service.
> * doc/guix.texi: Ditto.

Nice!

Note: You can just say “New file” for a new file; however please specify
the name of the node added to the manual, for clarity.

> +(define syncthing-home-shepherd-service
> +  (lambda (configuration)
> +    (map (lambda (srv) (shepherd-service (inherit srv) (requirement '())))
> +         ((@@ (gnu services syncthing) syncthing-shepherd-service) configuration))))

You could do that without resorting to @@, by using ‘find’ on the
extensions of ‘syncthing-service-type’.

> diff --git a/gnu/services/syncthing.scm b/gnu/services/syncthing.scm
> index 7c3d5b027d..960f0a1db8 100644
> --- a/gnu/services/syncthing.scm
> +++ b/gnu/services/syncthing.scm
> @@ -43,8 +43,7 @@ (define-record-type* <syncthing-configuration>
>               (default '()))
>    (logflags  syncthing-configuration-logflags  ;number
>               (default 0))
> -  (user      syncthing-configuration-user      ;string
> -             (default #f))
> +  (user      syncthing-configuration-user)     ;string

This means that users of ‘syncthing-service-type’ will now have to
provide a value for ‘user’, which wasn’t the case until now.  Is this
change necessary?

The rest looks reasonable to me.  My main concern is whether it would
make sense to automate system->home service translation.  I’ll expand on
that separately.

Thanks,
Ludo’.




  reply	other threads:[~2023-03-28 15:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23  8:10 [bug#62401] [PATCH] home: Add home-syncthing-service-type Sergey Trofimov
2023-03-28 15:58 ` Ludovic Courtès [this message]
2023-03-28 19:29   ` Sergey Trofimov
2023-03-29 16:35     ` Bruno Victal
     [not found] ` <87edp8g88j.fsf@gnu.org>
     [not found]   ` <07fc2e40-7e23-a7cb-469d-95aae6614ff5@makinata.eu>
2023-08-07  9:50     ` Ludovic Courtès

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=87o7ocg960.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=62401@debbugs.gnu.org \
    --cc=andrew@trop.in \
    --cc=paren@disroot.org \
    --cc=sarg@sarg.org.ru \
    /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).