From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id WM/4JTNEI2SySQEASxT56A (envelope-from ) for ; Tue, 28 Mar 2023 21:46:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id yOjOJTNEI2T1RQEAauVa8A (envelope-from ) for ; Tue, 28 Mar 2023 21:46:59 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5391C29FC3 for ; Tue, 28 Mar 2023 21:46:59 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=sarg.org.ru header.s=google header.b=Vg2VGANg; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680032819; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=jUPLpMWjJZDQ67N2NgrXVEkQIsSFqA6tmUlxYvXJCa8=; b=owOy17cuIabSN+ek7zzpaMT3yGGCJ4T3LXhtCR96H8GjKAeQNtDCE67FQ/hakBnB6yH0W/ N1hSUy178E4vTOY5XkL/oEzrUkmz9WOzkKMjtMvux/f41vuqRFWjjNX0PE5MuOnx0nwyvr 32YVp2bLUG47khO8QbHleJ5q5cV8wkGX6YxsczwjVmGo6y3Ew1IGIDtzNEe0saVV90Yc0N Hvl6mSRk6ESa1PRN+wic8wrLg8AJ7HpXDYIGf+TO8E48ul8TMgVmUpU+gWldBGGlc84hY9 xQZWl2ncCeAlM73QDR4QTf4WGSWVUaxjH3VLB5ccV1CiSmLfG4VGrTljtYh1uA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680032819; a=rsa-sha256; cv=none; b=jm/5xHy6Z6u4CRozXLVPV1GV52q2BMwI5PKP4Z+qGOH8mMs0eacEP1aKAEpItHekXCNvgw lu6c7wr7bgLjJ6UEjPa161W4cEXaAaVuKfmgI/Yirudky5wh6IEh5/OS82YBluvxYeIHg7 aXDwiVqFgZKYFur8FFOI8UyAyjIoUMLa1PKQRXtVEPmc3K6CIT31QGdwGVWLwh2HzUp39H /7Blu2VeP8KxLjb22uH4q8RwMgq8Mo1K9uWzAVvLZVilOT4gNHo1Fc8YLerQF1P1P84IOI ZNeSrAGXVDzKolSZKrdVNpmV/B/Hu++Zd3XAHkH4ZaIYEABRDvQnNrwU+2AImw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=sarg.org.ru header.s=google header.b=Vg2VGANg; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phFH9-0003WB-IS; Tue, 28 Mar 2023 15:46:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phFGy-0003Vl-A7 for guix-patches@gnu.org; Tue, 28 Mar 2023 15:46:28 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phFGd-00077P-2B for guix-patches@gnu.org; Tue, 28 Mar 2023 15:46:15 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1phFGc-0005F2-Gq for guix-patches@gnu.org; Tue, 28 Mar 2023 15:46:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62401] [PATCH] home: Add home-syncthing-service-type. Resent-From: Sergey Trofimov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Mar 2023 19:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62401 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: paren@disroot.org, 62401@debbugs.gnu.org, andrew@trop.in Received: via spool by 62401-submit@debbugs.gnu.org id=B62401.168003270520057 (code B ref 62401); Tue, 28 Mar 2023 19:46:02 +0000 Received: (at 62401) by debbugs.gnu.org; 28 Mar 2023 19:45:05 +0000 Received: from localhost ([127.0.0.1]:50744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phFFh-0005DR-7f for submit@debbugs.gnu.org; Tue, 28 Mar 2023 15:45:05 -0400 Received: from mail-ed1-f46.google.com ([209.85.208.46]:41716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phFFf-0005Cc-I1 for 62401@debbugs.gnu.org; Tue, 28 Mar 2023 15:45:04 -0400 Received: by mail-ed1-f46.google.com with SMTP id h8so54232853ede.8 for <62401@debbugs.gnu.org>; Tue, 28 Mar 2023 12:45:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1680032697; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:from:to:cc:subject:date :message-id:reply-to; bh=jUPLpMWjJZDQ67N2NgrXVEkQIsSFqA6tmUlxYvXJCa8=; b=Vg2VGANgUWZ2ZAkidaC0c9uYW0L7U2NRSTuBrn1RdzqrQAv1wioNBQKlmtT71APyX9 A3YfjyT5VuPHmvaw457h7L165T8S8ZfSZQFIZrhjT2ce6OupXhicCbzD4R/sEJUB5HXL rlzzxsVKK+Wfj1uzrtdr8ojfK4TL8jZAazKNg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680032697; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=jUPLpMWjJZDQ67N2NgrXVEkQIsSFqA6tmUlxYvXJCa8=; b=u8eydH7iGgWh/xKcpz73dG2FKjS0mk5ogKSfu4JbcWdY7op7Fa3qTlf5araJL6GCjr qSJSOLhJIIenxHLUpCgq9qbodtCWhwnpuZ55jP24ajHZn04zN4O03yr2v1cEzUddvbzn c63pQo9XkhF2gGPH7jefUq2s6233RWA6LKdEMppzDtZfr1UO9iD7wj0yviq9JHeqyzJb NwINjO4UICm06b8lyp/u6x/XTDE7an+QxuGDCSc3gQ6HcZrp/0QMGUHNlOWDJ1ukicI2 iziqITPxu7/sQJT0uG4qRLhDW29p4TuAerNj5waz1D4cWYm9Z5viuBTL8wJhLQZPxQ+h CT7g== X-Gm-Message-State: AAQBX9ftI/ttBSsNCpGRy+dQDoXCtrZeOUfYqMIMZDvpFoESReIx9Gy+ +YMlpnFr5PZk9Rf5By3/paPWBR9XBJBt+p4gVd1jRA== X-Google-Smtp-Source: AKy350aosbsaZa4uIe2nzhFys9NOwFXcskObo4B8lBVHylXb8G5zPi55jrbdq47AhgMvABaF0wszkw== X-Received: by 2002:a17:907:1c95:b0:93d:e6c8:ed5e with SMTP id nb21-20020a1709071c9500b0093de6c8ed5emr19943956ejc.20.1680032697654; Tue, 28 Mar 2023 12:44:57 -0700 (PDT) Received: from localhost ([95.168.146.53]) by smtp.gmail.com with ESMTPSA id l19-20020a170906079300b00932ed432475sm14368725ejc.124.2023.03.28.12.44.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 12:44:57 -0700 (PDT) References: <20230323081026.13850-1-sarg@sarg.org.ru> <87o7ocg960.fsf@gnu.org> User-agent: mu4e 1.10.0; emacs 29.0.60 From: Sergey Trofimov Date: Tue, 28 Mar 2023 21:29:15 +0200 In-reply-to: <87o7ocg960.fsf@gnu.org> Message-ID: <87ilek64p4.fsf@sarg.org.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: 5391C29FC3 X-Spam-Score: -1.83 X-Migadu-Spam-Score: -1.83 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: Eq12LQiNQrmp Hi Ludovic, Ludovic Courtès writes: > Hi, > > Sergey Trofimov 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. So it looks like this? --8<---------------cut here---------------start------------->8--- * gnu/home/services/syncthing.scm: New file. * doc/guix.texi: Document home-syncthing-service-type and home-syncthing-configuration. --8<---------------cut here---------------end--------------->8--- >> +(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’. Not sure I get you. I use @@ because `syncthing-shepherd-service` is not exported and I want to leave that as is. >> 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* >> >> (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 existing code fails on this line, when the user is not specified: --8<---------------cut here---------------start------------->8--- (provision (list (string->symbol (string-append "syncthing-" user)))) --8<---------------cut here---------------end--------------->8--- string-append doesn't accept nil args > > 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. Does guix really need a system syncthing service? It runs under `user`, looks for configuration in `/home/user` and therefore looks out of place in the system services list.