From unknown Tue Sep 23 05:03:25 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#61483 <61483@debbugs.gnu.org> To: bug#61483 <61483@debbugs.gnu.org> Subject: Status: [PATCH 0/5] Some basic Home Shepherd Services Reply-To: bug#61483 <61483@debbugs.gnu.org> Date: Tue, 23 Sep 2025 12:03:25 +0000 retitle 61483 [PATCH 0/5] Some basic Home Shepherd Services reassign 61483 guix-patches submitter 61483 "Jan (janneke) Nieuwenhuizen" severity 61483 normal tag 61483 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 13 11:46:51 2023 Received: (at submit) by debbugs.gnu.org; 13 Feb 2023 16:46:51 +0000 Received: from localhost ([127.0.0.1]:51331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRbyd-0003ki-8y for submit@debbugs.gnu.org; Mon, 13 Feb 2023 11:46:51 -0500 Received: from lists.gnu.org ([209.51.188.17]:47588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRbyZ-0003kW-8T for submit@debbugs.gnu.org; Mon, 13 Feb 2023 11:46:49 -0500 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 1pRbyZ-0005Bg-1q for guix-patches@gnu.org; Mon, 13 Feb 2023 11:46:47 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRbyY-0004cb-7U; Mon, 13 Feb 2023 11:46:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=fmwXT+B4CaM4n59QpjQ5u37pro/cmkNV9C/6zI4zhiI=; b=b+Fl6a/Euag5LZ 32wMsuiI1B3h8HI3CcWP4t003VWoITI7Q/+cqZrR4VD4isS5J6wbAXX+/TikSjx1a3qBw+CCfXMaf Cm8GSWxnmNfV1NiVo8tZQe7ipOjp2qn4NF0MsHpGWpu9abYfrsPA4xQ9El09GDbra+S0oxylgKUhX fUcIXD7FP5mr2q9prYr/uhT3RvHfAi+hx+DqQ1Cr5DzicJdgNdec7TXO/Z+8AtJF5rLUWST9Dt8dK FR2PRrzIzftGkQuuxhlEa19SgfDZXKS9rOW4MRyTEGr9TA7wKanJ1yg1aPPXjE+M31fvfgSkGHm2B hNQezKxWYDgOCuWwZRnw==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1pRbyX-0000x5-Ix; Mon, 13 Feb 2023 11:46:45 -0500 From: "Jan (janneke) Nieuwenhuizen" To: guix-patches@gnu.org Subject: [PATCH 0/5] Some basic Home Shepherd Services Date: Mon, 13 Feb 2023 17:46:42 +0100 Message-Id: <20230213164642.24419-1-janneke@gnu.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Janneke Nieuwenhuizen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) From: "Janneke Nieuwenhuizen" Hi! I've been waiting for Guix Home to offer some basic shepherd services for most used daemons, replacing the neat shepherd hack described in https://guix.gnu.org/en/blog/2020/gnu-shepherd-user-services/ that I've been using, and am a bit puzzled as to why this didn't happen. Are people using Guix Home? Anyway, here's my attempt to address this, adding ssh-agent, git-daemon, and also the probably less-used kodi and znc that I use on my home server. To add a git-daemon and ssh-agent to your guix home profile, you need a home-configuration.scm that has something like this: --8<---------------cut here---------------start------------->8--- (use-modules (gnu home) (gnu home services shells) (gnu home services shepherd) (gnu home services shepherd-xyz) (gnu packages) (gnu packages base) (gnu services) (guix gexp)) (services (list (service home-shepherd-service-type) (service home-git-daemon-service-type) (service home-ssh-agent-service-type))) --8<---------------cut here---------------end--------------->8--- The weird thing is that after running ./pre-inst-env guix home reconfigure home-configuration.scm the shepherd starts automatically, starting ssh-agent and git-daemon. Upon a fresh login, however, it seems the shepherd must still be started manually, kind of defeating its purpose as a home service... Thoughts? Greetings, Janneke Also pushed to https://gitlab.com/janneke/guix/-/commits/wip-home/ Janneke Nieuwenhuizen (5): DRAFT gnu: home: services: Add home-git-daemon-service-type. DRAFT gnu: home: services: Add home-ssh-agent-service-type. DRAFT gnu: home: services: Add home-znc-service-type. DRAFT gnu: home: services: Add home-kodi-service-type. DRAFT doc: Document Home Shepherd Services. doc/guix.texi | 90 ++++++++++- gnu/home/services/shepherd-xyz.scm | 239 +++++++++++++++++++++++++++++ gnu/local.mk | 3 +- 3 files changed, 330 insertions(+), 2 deletions(-) create mode 100644 gnu/home/services/shepherd-xyz.scm -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 13 11:51:14 2023 Received: (at 61483) by debbugs.gnu.org; 13 Feb 2023 16:51:15 +0000 Received: from localhost ([127.0.0.1]:51345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRc2s-0003wE-1t for submit@debbugs.gnu.org; Mon, 13 Feb 2023 11:51:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRc2q-0003vl-NP for 61483@debbugs.gnu.org; Mon, 13 Feb 2023 11:51:13 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRc2k-0005SF-J9; Mon, 13 Feb 2023 11:51:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=az2pukixNgBCZUYN49tZORQllUWue+6Fbt4sNjS8lek=; b=sTWyGsg0nNaQB0CcZtlW SQvHm8X4eL4mehaNOAjPUC2RvYNcHDn1cByBnibxEW5/MjzA3+/5GfRiNg0BFyfhRNtf63shCU+vx WOVv+20SEC6d0AM11uU3LCzgTGkcTHBvwe8qZkJGSvOF6TI0n7nVKMUZZgaOeOr2qI/K79p3DU7uB Is3UStQLyPc9j8Ur922zABbHF3cd+9f3RSmq88VzmU7FoJrFCR4BGonQ5K4IuqsaITbPyXN42EqL7 BxQ+XE07aD6bGo6ArZz/Pa6acWJJ7UwB59NhWPcDs2PqS9QCeAw7k8cpEMtZFrZ7C/YPlBYkiE/7L XXfaJLFTdQeEYg==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1pRc2i-0001Mq-BI; Mon, 13 Feb 2023 11:51:04 -0500 From: Janneke Nieuwenhuizen To: 61483@debbugs.gnu.org Subject: [PATCH 3/5] DRAFT gnu: home: services: Add home-znc-service-type. Date: Mon, 13 Feb 2023 17:50:55 +0100 Message-Id: <20230213165057.24518-3-janneke@gnu.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230213165057.24518-1-janneke@gnu.org> References: <20230213165057.24518-1-janneke@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: Janneke Nieuwenhuizen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) From: "Janneke Nieuwenhuizen" * gnu/home/services/shepherd-xyz.scm (): New type. (home-znc-services): New procedure. (home-znc-service-type): New variable. --- gnu/home/services/shepherd-xyz.scm | 43 +++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/gnu/home/services/shepherd-xyz.scm b/gnu/home/services/shepherd-xyz.scm index 38ab7d60ef..4f2a2435ac 100644 --- a/gnu/home/services/shepherd-xyz.scm +++ b/gnu/home/services/shepherd-xyz.scm @@ -22,6 +22,7 @@ (define-module (gnu home services shepherd-xyz) #:use-module (gnu home services) #:use-module (gnu home services shepherd) + #:use-module (gnu packages messaging) #:use-module (gnu packages ssh) #:use-module (gnu packages version-control) #:use-module (gnu services configuration) @@ -32,7 +33,9 @@ (define-module (gnu home services shepherd-xyz) #:export (home-git-daemon-configuration home-git-daemon-service-type home-ssh-agent-configuration - home-ssh-agent-service-type)) + home-ssh-agent-service-type + home-znc-configuration + home-znc-service-type)) ;;; Commentary: ;; @@ -156,3 +159,41 @@ (define home-ssh-agent-service-type home-ssh-agent-services))) (description "Install and configure the ssh-agent as a shepherd service."))) + + +;;; +;;; Znc. +;;; +(define-record-type* + home-znc-configuration make-home-znc-configuration + home-znc-configuration? + (znc home-znc-znc ;string + (default #~(string-append #$znc "/bin/znc"))) + (log-dir home-znc-log-dir ;string + (default %user-log-dir))) + +(define (home-znc-services config) + "Return a for znc with CONFIG." + (match config + (($ znc log-dir) + (list (shepherd-service + (documentation "Run the znc IRC bouncer.") + (provision '(znc)) + (start #~(lambda _ + (unless (file-exists? #$log-dir) + (mkdir-p #$log-dir)) + (fork+exec-command + (list #$znc + "--foreground") + #:log-file (string-append #$log-dir "/znc.log")))) + (stop #~(make-kill-destructor))))))) + +(define home-znc-service-type + (service-type + (name 'home-znc) + (default-value (home-znc-configuration)) + (extensions + (list (service-extension home-shepherd-service-type + home-znc-services))) + (description + "Install and configure znc as a shepherd service."))) -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 13 11:51:15 2023 Received: (at 61483) by debbugs.gnu.org; 13 Feb 2023 16:51:15 +0000 Received: from localhost ([127.0.0.1]:51347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRc2s-0003wQ-Qe for submit@debbugs.gnu.org; Mon, 13 Feb 2023 11:51:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRc2q-0003vk-No for 61483@debbugs.gnu.org; Mon, 13 Feb 2023 11:51:13 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRc2i-0005S9-8G; Mon, 13 Feb 2023 11:51:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=FZO+M/BrK3feJIsnBCE9bvsIG/65gukfmkb0ONb6jXg=; b=HzTPnRAAF7HKI25ec1wT +7L7060ikZ6lcQKGoWyGidC44YkNBmjjLPmHHaw2IMMKJ+mBxFhehIudgt3wHxgbeqzYOILyBkKFZ YMiOnnNT2tMMno5t2fNrPuA1PL+mFJoL9QoBsBeWF9HyW4vIzTU0WEoe82qbnDRLm2VUx8Ug7FH+0 eyuJ5AmE9qqIHHhPiN045OeWkM/b9v1g3OV1vkJousKHyipQoy1wLGOuJl9hEd9TK7ozyjYXnG02i zEl/SNpcARwhJm5yirROVX9E1Y+TnGz7oVrliDaDMjR2Z1gSEIMfOqKN6tpyG/ecEadPrDoxZti9h WLAoFY+Jas8xcQ==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1pRc2g-0001Mq-DI; Mon, 13 Feb 2023 11:51:02 -0500 From: Janneke Nieuwenhuizen To: 61483@debbugs.gnu.org Subject: [PATCH 2/5] DRAFT gnu: home: services: Add home-ssh-agent-service-type. Date: Mon, 13 Feb 2023 17:50:54 +0100 Message-Id: <20230213165057.24518-2-janneke@gnu.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230213165057.24518-1-janneke@gnu.org> References: <20230213165057.24518-1-janneke@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: Janneke Nieuwenhuizen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) From: "Janneke Nieuwenhuizen" * gnu/home/services/shepherd-xyz.scm (): New type. (home-ssh-agent-services): New procedure. (home-ssh-agent-service-type): New variable. --- gnu/home/services/shepherd-xyz.scm | 58 +++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/gnu/home/services/shepherd-xyz.scm b/gnu/home/services/shepherd-xyz.scm index 1bf857b591..38ab7d60ef 100644 --- a/gnu/home/services/shepherd-xyz.scm +++ b/gnu/home/services/shepherd-xyz.scm @@ -22,6 +22,7 @@ (define-module (gnu home services shepherd-xyz) #:use-module (gnu home services) #:use-module (gnu home services shepherd) + #:use-module (gnu packages ssh) #:use-module (gnu packages version-control) #:use-module (gnu services configuration) #:use-module (gnu services shepherd) @@ -29,7 +30,9 @@ (define-module (gnu home services shepherd-xyz) #:use-module (guix gexp) #:export (home-git-daemon-configuration - home-git-daemon-service-type)) + home-git-daemon-service-type + home-ssh-agent-configuration + home-ssh-agent-service-type)) ;;; Commentary: ;; @@ -43,6 +46,15 @@ (define-module (gnu home services shepherd-xyz) ;; (home-git-configuration ;; (root (string-append (getenv "HOME") "/src")))) ;; +;; Ssh-agent +;; +;; Add to your ~/.bash_profile: +;; +;; SSH_AUTH_SOCK=${XDG_RUNTIME_DIR-$HOME/.cache}/ssh-agent/socket +;; export SSH_AUTH_SOCK +;; +;; (service home-ssh-agent-service-type) +;; ;;; Code: ;;; @@ -100,3 +112,47 @@ (define home-git-daemon-service-type home-git-daemon-services))) (description "Install and configure the git-daemon as a shepherd service."))) + + +;;; +;;; Ssh-agent. +;;; +(define-record-type* + home-ssh-agent-configuration make-home-ssh-agent-configuration + home-ssh-agent-configuration? + (ssh-agent home-ssh-agent-ssh-agent ;string + (default #~(string-append #$openssh "/bin/ssh-agent"))) + (socket-dir home-ssh-agent-socket-dir ;string + (default (string-append %user-runtime-dir "/ssh-agent"))) + (log-dir home-ssh-agent-log-dir ;string + (default %user-log-dir))) + +(define (home-ssh-agent-services config) + "Return a for an ssh-agent with CONFIG." + (match config + (($ ssh-agent socket-dir log-dir) + (list (shepherd-service + (documentation "Run the ssh-agent.") + (provision '(ssh-agent)) + (start #~(lambda _ + (unless (file-exists? #$socket-dir) + (mkdir-p #$socket-dir) + (chmod #$socket-dir #o700)) + (unless (file-exists? #$log-dir) + (mkdir-p #$log-dir)) + (fork+exec-command + (list #$ssh-agent + "-D" + "-a" (string-append #$socket-dir "/socket")) + #:log-file (string-append #$log-dir "/ssh-agent.log")))) + (stop #~(make-kill-destructor))))))) + +(define home-ssh-agent-service-type + (service-type + (name 'home-ssh-agent) + (default-value (home-ssh-agent-configuration)) + (extensions + (list (service-extension home-shepherd-service-type + home-ssh-agent-services))) + (description + "Install and configure the ssh-agent as a shepherd service."))) -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 13 11:51:15 2023 Received: (at 61483) by debbugs.gnu.org; 13 Feb 2023 16:51:15 +0000 Received: from localhost ([127.0.0.1]:51349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRc2t-0003wY-DR for submit@debbugs.gnu.org; Mon, 13 Feb 2023 11:51:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRc2q-0003vo-SP for 61483@debbugs.gnu.org; Mon, 13 Feb 2023 11:51:13 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRc2l-0005SV-K8; Mon, 13 Feb 2023 11:51:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=RPGEDHqBe/7Rs8KQu6SsGZzGD9XP4DBmZ4AyS2/NPGg=; b=WqUWRL2PkWbwYVJZ0KNz dRPSchRvJVtgPiR067zfjiSsPnctN+QF5XDlFRD0g23zEJVPD9oprgrdRw3IIisXxgmJYnIUZfVGm 6Bbxa/2iNW4Ts+qdgYMKK1SrGGvGKiqLLPvtmSNDw3BGmlikZwK4iGDUpRV/XI+7qYoVxNAG2dJfP 04BDHaUPCCP3NLbpHbfOMbMJfV1jMYC8kDkjGlARdc18OqPBNK6N6yAd96e2mIMfBG/vc4N3uV3F4 n0o9W4d/2KiiSACrfKzaACAQePPdFRd87cFMTUAkCGapTehM7zsSB06HrC01ltnI/gH9JoLJcIR9K kM1yGULfFLuc5g==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1pRc2k-0001Mq-Ll; Mon, 13 Feb 2023 11:51:07 -0500 From: Janneke Nieuwenhuizen To: 61483@debbugs.gnu.org Subject: [PATCH 4/5] DRAFT gnu: home: services: Add home-kodi-service-type. Date: Mon, 13 Feb 2023 17:50:56 +0100 Message-Id: <20230213165057.24518-4-janneke@gnu.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230213165057.24518-1-janneke@gnu.org> References: <20230213165057.24518-1-janneke@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: Janneke Nieuwenhuizen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) From: "Janneke Nieuwenhuizen" * gnu/home/services/shepherd-xyz.scm (): New type. (home-kodi-services): New procedure. (home-kodi-service-type): New variable. --- gnu/home/services/shepherd-xyz.scm | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/home/services/shepherd-xyz.scm b/gnu/home/services/shepherd-xyz.scm index 4f2a2435ac..8bb9aa96cd 100644 --- a/gnu/home/services/shepherd-xyz.scm +++ b/gnu/home/services/shepherd-xyz.scm @@ -22,6 +22,7 @@ (define-module (gnu home services shepherd-xyz) #:use-module (gnu home services) #:use-module (gnu home services shepherd) + #:use-module (gnu packages kodi) #:use-module (gnu packages messaging) #:use-module (gnu packages ssh) #:use-module (gnu packages version-control) @@ -32,6 +33,8 @@ (define-module (gnu home services shepherd-xyz) #:export (home-git-daemon-configuration home-git-daemon-service-type + home-kodi-configuration + home-kodi-service-type home-ssh-agent-configuration home-ssh-agent-service-type home-znc-configuration @@ -116,6 +119,43 @@ (define home-git-daemon-service-type (description "Install and configure the git-daemon as a shepherd service."))) + +;;; +;;; Kodi. +;;; +(define-record-type* + home-kodi-configuration make-home-kodi-configuration + home-kodi-configuration? + (kodi home-kodi-kodi ;string + (default #~(string-append #$kodi "/bin/kodi"))) + (log-dir home-kodi-log-dir ;string + (default %user-log-dir))) + +(define (home-kodi-services config) + "Return a for kodi with CONFIG." + (match config + (($ kodi log-dir) + (list (shepherd-service + (documentation "Run the kodi media center.") + (provision '(kodi)) + (start #~(lambda _ + (unless (file-exists? #$log-dir) + (mkdir-p #$log-dir)) + (fork+exec-command + (list #$kodi "-fs") + #:log-file (string-append #$log-dir "/kodi.log")))) + (stop #~(make-kill-destructor))))))) + +(define home-kodi-service-type + (service-type + (name 'home-kodi) + (default-value (home-kodi-configuration)) + (extensions + (list (service-extension home-shepherd-service-type + home-kodi-services))) + (description + "Install and configure kodi as a shepherd service."))) + ;;; ;;; Ssh-agent. -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 13 11:51:21 2023 Received: (at 61483) by debbugs.gnu.org; 13 Feb 2023 16:51:21 +0000 Received: from localhost ([127.0.0.1]:51351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRc2y-0003wq-Sp for submit@debbugs.gnu.org; Mon, 13 Feb 2023 11:51:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43224) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRc2q-0003vp-Ur for 61483@debbugs.gnu.org; Mon, 13 Feb 2023 11:51:14 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRc2g-0005Qh-2q; Mon, 13 Feb 2023 11:51:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=iJrJYukBnWlmeukqA5fgG6brrx7rkiP+xZuIByqCa/4=; b=K30NGSLVstX3Xa Nep3bWtL2BaJx3I/IScRDqMLJw2UOLmVoDDz2aXml6hPhP0ckNGGMAJ6Km2YApOl6QO2Uve1jAS1e zXppdTU2gwyUViXr5hugsommk/ssgG8B7ezT/BHXAwgkpTHB92d+9SI5iJJp90mnDKsXq5ZTXLosr XdkuD5vr91yhu6qaNHaleSog+aiREPtDRLCSwIc8zSNRLl+CeLqECYgz42iCxGy4PRwa3OfX6a7Zj aKu7L6g9eRQ2u6zGq3CUC46uaXjgm6/43WzQ/fnZLSKZpAM1rGuOPGVTgWnEGGG3Vyd53akkzsXFG 7D4/c2gCyQz9+8i5cUQg==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1pRc2e-0001Mq-Fl; Mon, 13 Feb 2023 11:51:01 -0500 From: Janneke Nieuwenhuizen To: 61483@debbugs.gnu.org Subject: [PATCH 1/5] DRAFT gnu: home: services: Add home-git-daemon-service-type. Date: Mon, 13 Feb 2023 17:50:53 +0100 Message-Id: <20230213165057.24518-1-janneke@gnu.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: Janneke Nieuwenhuizen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) From: "Janneke Nieuwenhuizen" * gnu/home/services/shepherd-xyz.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/home/services/shepherd-xyz.scm | 102 +++++++++++++++++++++++++++++ gnu/local.mk | 3 +- 2 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 gnu/home/services/shepherd-xyz.scm diff --git a/gnu/home/services/shepherd-xyz.scm b/gnu/home/services/shepherd-xyz.scm new file mode 100644 index 0000000000..1bf857b591 --- /dev/null +++ b/gnu/home/services/shepherd-xyz.scm @@ -0,0 +1,102 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2023 Janneke Nieuwenhuizen +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu home services shepherd-xyz) + #:use-module (ice-9 match) + #:use-module (shepherd support) + + #:use-module (gnu home services) + #:use-module (gnu home services shepherd) + #:use-module (gnu packages version-control) + #:use-module (gnu services configuration) + #:use-module (gnu services shepherd) + #:use-module (guix records) + #:use-module (guix gexp) + + #:export (home-git-daemon-configuration + home-git-daemon-service-type)) + +;;; Commentary: +;; +;; Home Services for the Shepherd. +;; +;; Example configurations. +;; +;; Git daemon: use $HOME/src as the base directory. +;; +;; (service home-git-service-type +;; (home-git-configuration +;; (root (string-append (getenv "HOME") "/src")))) +;; +;;; Code: + +;;; +;;; Directories. +;;; +(define %user-data-home + ;; Default cache directory if shepherd is run as a normal user. + (string-append (or (getenv "XDG_DATA_HOME") + (string-append user-homedir "/.local/share")))) + +(define %user-log-dir + ;; Default log directory if shepherd is run as a normal user. + (string-append (or (getenv "XDG_DATA_HOME") + (string-append user-homedir "/.local/share")) + "/shepherd")) + + +;;; +;;; Git daemon. +;;; +(define-record-type* + home-git-daemon-configuration make-home-git-daemon-configuration + home-git-daemon-configuration? + (git home-git-daemon-git ;string + (default #~(string-append #$git "/bin/git"))) + (root home-git-daemon-root ;string + (default (string-append %user-data-home "/git-daemon"))) + (log-dir home-git-daemon-log-dir ;string + (default %user-log-dir))) + +(define (home-git-daemon-services config) + "Return a for a git daemon with CONFIG." + (match config + (($ git root log-dir) + (list (shepherd-service + (documentation "Run the git daemon.") + (provision '(git-daemon)) + (start #~(lambda _ + (unless (file-exists? #$log-dir) + (mkdir-p #$log-dir)) + (fork+exec-command + (list #$git + "daemon" + (string-append "--base-path=" #$root) + "--export-all") + #:log-file (string-append #$log-dir "/git-daemon.log")))) + (stop #~(make-kill-destructor))))))) + +(define home-git-daemon-service-type + (service-type + (name 'home-git-daemon) + (default-value (home-git-daemon-configuration)) + (extensions + (list (service-extension home-shepherd-service-type + home-git-daemon-services))) + (description + "Install and configure the git-daemon as a shepherd service."))) diff --git a/gnu/local.mk b/gnu/local.mk index 7278c50e4f..134b81f24f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -11,7 +11,7 @@ # Copyright © 2016 Ben Woodcroft # Copyright © 2016, 2017, 2018, 2019 Alex Vong # Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner -# Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022 Jan (janneke) Nieuwenhuizen +# Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Jan (janneke) Nieuwenhuizen # Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice # Copyright © 2017, 2018 Clément Lassieur # Copyright © 2017, 2020 Mathieu Othacehe @@ -94,6 +94,7 @@ GNU_SYSTEM_MODULES = \ %D%/home/services/pm.scm \ %D%/home/services/shells.scm \ %D%/home/services/shepherd.scm \ + %D%/home/services/shepherd-xyz.scm \ %D%/home/services/ssh.scm \ %D%/home/services/mcron.scm \ %D%/home/services/utils.scm \ -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 13 11:51:22 2023 Received: (at 61483) by debbugs.gnu.org; 13 Feb 2023 16:51:22 +0000 Received: from localhost ([127.0.0.1]:51353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRc2z-0003ws-Gf for submit@debbugs.gnu.org; Mon, 13 Feb 2023 11:51:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRc2r-0003vr-MA for 61483@debbugs.gnu.org; Mon, 13 Feb 2023 11:51:14 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRc2m-0005Sn-Ex; Mon, 13 Feb 2023 11:51:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=t8GkcjUURTlShaI9qYZ+NUQdttLUSINbllF4bssTXB8=; b=Kyc6O6tw0Gd5aSkz/Fst euH8PYoT1Un8Zu6kikL2arPZr0yXc3gK+tegXDEHOXaGUnwtl4X6nre2wYiOoFDyJeCD8GOtvnYTv WIYdoBVaRGyGonjk+yMAYX1ViN5xWrt3Gv0qb6aynNPupTmjmE3zpaD3EfVznjxqsMEGdK2nzWW0y U2gNw2zIYR445pxBYQz+nxW0YOmLgHCjjCvcJ3itMDztcjabLIOQ1oGEJx6EL0qI1pb7WNolVnhPe GVBKumFv9+hY587XAdLv/AT4LyTCc+pn8EbeNt97Hg1rhl88kxEws5sM2lzVgdUFARKQ+dLC5hF36 jiYbIkMvTdOSLA==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1pRc2l-0001Mq-SH; Mon, 13 Feb 2023 11:51:08 -0500 From: Janneke Nieuwenhuizen To: 61483@debbugs.gnu.org Subject: [PATCH 5/5] DRAFT doc: Document Home Shepherd Services. Date: Mon, 13 Feb 2023 17:50:57 +0100 Message-Id: <20230213165057.24518-5-janneke@gnu.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230213165057.24518-1-janneke@gnu.org> References: <20230213165057.24518-1-janneke@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: Janneke Nieuwenhuizen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) From: "Janneke Nieuwenhuizen" * doc/guix.texi (Shepherd Home Services): New subsubsection. --- doc/guix.texi | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 89 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 784114f0bb..04ce076784 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -36,7 +36,7 @@ Copyright @copyright{} 2016, 2017, 2018, 2021 Chris Marusich@* Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner@* Copyright @copyright{} 2016 John Darrington@* Copyright @copyright{} 2016, 2017 Nikita Gillmann@* -Copyright @copyright{} 2016, 2017, 2018, 2019, 2020 Jan Nieuwenhuizen@* +Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2023 Jan Nieuwenhuizen@* Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Julien Lepiller@* Copyright @copyright{} 2016 Alex ter Weele@* Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Christopher Baines@* @@ -41285,6 +41285,94 @@ mechanism instead (@pxref{Shepherd Services}). @end table @end deftp +@menu +* Shepherd Home Services:: +@end menu + +@node Shepherd Home Services +@subsubsection e Shepherd Home Services + +The @code{(gnu home services shepherd-xyz)} module provides serveral +home shepherd services. + +@defvr {Scheme Variable} home-git-daemon-service-type +This is the type of the @code{git daemon} home service, whose value is an +@code{home-git-daemon-configuration} object. +@end defvr + +@deftp {Data Type} home-git-daemon-configuration +Available @code{home-git-daemon-configuration} fields are: + +@table @asis +@item @code{git} (default: @code{git}) (type: file-like) +The git package to use. + +@item @code{root} (default: @code{"~/git-daemon"}) (type: string) +The git deamon's base directory. + +@item @code{log-dir} (default: @code{@env{XDG_CONFIG_HOME}/shepherd"}) (type: string) +The directory to write the @file{git-daemon.log} file. + +@end table +@end deftp + +@defvr {Scheme Variable} home-kodi-service-type +This is the type of the @code{git daemon} home service, whose value is an +@code{home-kodi-configuration} object. +@end defvr + +@deftp {Data Type} home-kodi-configuration +Available @code{home-kodi-configuration} fields are: + +@table @asis +@item @code{git} (default: @code{git}) (type: file-like) +The git package to use. + +@item @code{log-dir} (default: @code{@env{XDG_CONFIG_HOME}/shepherd"}) (type: string) +The directory to write the @file{kodi.log} file. + +@end table +@end deftp + +@defvr {Scheme Variable} home-ssh-agent-service-type +This is the type of the @code{git daemon} home service, whose value is an +@code{home-ssh-agent-configuration} object. +@end defvr + +@deftp {Data Type} home-ssh-agent-configuration +Available @code{home-ssh-agent-configuration} fields are: + +@table @asis +@item @code{git} (default: @code{git}) (type: file-like) +The git package to use. + +@item @code{socket-dir} (default: @code{@env{XDG_RUNTIME_DIR}/ssh-agent"}) (type: string) +The directory to write the ssh-agent's @file{socket} file. + +@item @code{log-dir} (default: @code{@env{XDG_CONFIG_HOME}/shepherd"}) (type: string) +The directory to write the @file{ssh-agent.log} file. + +@end table +@end deftp + +@defvr {Scheme Variable} home-znc-service-type +This is the type of the @code{git daemon} home service, whose value is an +@code{home-znc-configuration} object. +@end defvr + +@deftp {Data Type} home-znc-configuration +Available @code{home-znc-configuration} fields are: + +@table @asis +@item @code{git} (default: @code{git}) (type: file-like) +The git package to use. + +@item @code{log-dir} (default: @code{@env{XDG_CONFIG_HOME}/shepherd"}) (type: string) +The directory to write the @file{znc.log} file. + +@end table +@end deftp + @node Secure Shell @subsection Secure Shell -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 14 08:45:23 2023 Received: (at 61483) by debbugs.gnu.org; 14 Feb 2023 13:45:23 +0000 Received: from localhost ([127.0.0.1]:52917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRvcZ-00019h-Ex for submit@debbugs.gnu.org; Tue, 14 Feb 2023 08:45:23 -0500 Received: from smtpmciv1.myservices.hosting ([185.26.107.237]:57926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRvcY-00019X-48 for 61483@debbugs.gnu.org; Tue, 14 Feb 2023 08:45:22 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv1.myservices.hosting (Postfix) with ESMTP id 58BB520C19; Tue, 14 Feb 2023 14:45:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 0EE3180097; Tue, 14 Feb 2023 14:45:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hNPw1rTY2Udl; Tue, 14 Feb 2023 14:45:16 +0100 (CET) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id AC3E080079; Tue, 14 Feb 2023 14:45:16 +0100 (CET) Message-ID: <75a31f8d-d883-ff72-0667-b52473657434@makinata.eu> Date: Tue, 14 Feb 2023 13:45:16 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [bug#61483] [PATCH 1/5] DRAFT gnu: home: services: Add home-git-daemon-service-type. Content-Language: en-US To: Janneke Nieuwenhuizen References: <20230213164642.24419-1-janneke@gnu.org> <20230213165057.24518-1-janneke@gnu.org> From: Bruno Victal In-Reply-To: <20230213165057.24518-1-janneke@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) Hi, Have you tried using (non-home) git-daemon-service-type as a home service? I think it should work. Cheers, Bruno From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 14 10:14:51 2023 Received: (at 61483) by debbugs.gnu.org; 14 Feb 2023 15:14:51 +0000 Received: from localhost ([127.0.0.1]:56722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRx19-0004YV-DY for submit@debbugs.gnu.org; Tue, 14 Feb 2023 10:14:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRx18-0004YJ-10 for 61483@debbugs.gnu.org; Tue, 14 Feb 2023 10:14:50 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRx12-0004gX-5j; Tue, 14 Feb 2023 10:14:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=VrTUTk6GTVyTeTKORId9k6NQKDeRRXGEghhgL2vjRLo=; b=o6zp+M+5an31NKmd11xY gscXLfdwGKXkd6K8GRY1dTBQsG6FWq/Rbj0HT91RrLSRvDAJ7V59qfxSy7z15xUoUMAya2J51+ISU au7mEb2Fw9fjqVpd3scAdba/WDp09IxN85OdC4oGSKD+Hzy6+CyGpiQ0cVJz6MzN/HynCxQNP9+oP mwthYDvT1IfP2fn6vSU/9sF7BAis99EHi88F5Ee9o3gF/Zf8AteWHzMGgZuoRWCZRCd3Mxu6UVNE3 WRDhKgvJs7n0rfvNPMjC71GRL/tC+w1dAm3121+OWVJ+TSpLbXfoHVSgVQ+BYb1Ynf6+/tkTt5Ryj FpUf5n672gH8nw==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRx11-0006HE-GE; Tue, 14 Feb 2023 10:14:43 -0500 From: Janneke Nieuwenhuizen To: 61483@debbugs.gnu.org Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services References: <20230213164642.24419-1-janneke@gnu.org> Date: Tue, 14 Feb 2023 16:14:39 +0100 In-Reply-To: <20230213164642.24419-1-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Mon, 13 Feb 2023 17:46:42 +0100") Message-ID: <87edqsi8io.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Jan (janneke) Nieuwenhuizen writes: > The weird thing is that after running > > ./pre-inst-env guix home reconfigure home-configuration.scm > > the shepherd starts automatically, starting ssh-agent and git-daemon. Up= on a > fresh login, however, it seems the shepherd must still be started manuall= y, > kind of defeating its purpose as a home service... > > Thoughts? Okay, after playing with this some more using a clean account all seems to work fine. Apparently there was some weird interaction with my current shepherd-service setup interacted. Greetings, Janneke --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 14 10:18:06 2023 Received: (at 61483) by debbugs.gnu.org; 14 Feb 2023 15:18:06 +0000 Received: from localhost ([127.0.0.1]:56727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRx4I-0004dy-1Y for submit@debbugs.gnu.org; Tue, 14 Feb 2023 10:18:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRx4G-0004dV-GR for 61483@debbugs.gnu.org; Tue, 14 Feb 2023 10:18:04 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRx4A-0005YB-Mm; Tue, 14 Feb 2023 10:17:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Pp3slur5BF/frvhEgTHjsITZzNqgB77JNV29Ge86Uao=; b=qdGLRX7PX63w/SdfdQ/l 9ebKvPhU8UkVppoIwUyWDLrwNXi+4RYL4tcYC4wrpGIiUMD5Zg1pkBI7VQJQDPISuWvkb6/pRSl70 4JY3mLdgeMXgH/gW3gYoPlOL2OV9zbH4aKTnqtZcG2kQAjiydUbOmNbn3Jp3J/TiXbVLdITgmyWyP 0RQdhH0AlGOhdXzDwijnHYpogN6tuc5T9YYXW2OPIlhyd0R5yX4aUgwbpFssHKYW0fYdtcZk+ODOO TShFo7Fpb/cOzvsEJOC8Q96VTfZSWHPTJYxLQk9W8YnhIoqjq/qxZd6HQosJJwgBzVmfkRWUD15He pY/nFFYK6lfgWg==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRx4A-0006i0-Ac; Tue, 14 Feb 2023 10:17:58 -0500 From: Jan Nieuwenhuizen To: Bruno Victal Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services References: <20230213164642.24419-1-janneke@gnu.org> <20230213165057.24518-1-janneke@gnu.org> <75a31f8d-d883-ff72-0667-b52473657434@makinata.eu> Date: Tue, 14 Feb 2023 16:17:55 +0100 In-Reply-To: <75a31f8d-d883-ff72-0667-b52473657434@makinata.eu> (Bruno Victal's message of "Tue, 14 Feb 2023 13:45:16 +0000") Message-ID: <87a61gi8d8.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Bruno Victal writes: > Have you tried using (non-home) git-daemon-service-type as a home service? Yeah, I tried --8<---------------cut here---------------start------------->8--- (use-modules (gnu services version-control)) ;; [..] ,@(let ((root (string-append (getenv "HOME") "/git-daemon"))) (if (not (file-exists? root)) '() `(,(service git-daemon-service-type (git-daemon-configuration (base-path root) (export-all? #t)))))) --8<---------------cut here---------------end--------------->8--- and upon guix home reconfigure I got guix home: error: no target of type 'account' for service 'git-daemon' > I think it should work. It might, and that would be nice, but I would need some more guidance as to handle the account setup thing? Greetings, Janneke --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 10:54:10 2023 Received: (at 61483) by debbugs.gnu.org; 16 Feb 2023 15:54:10 +0000 Received: from localhost ([127.0.0.1]:37438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSgaH-0007pP-OR for submit@debbugs.gnu.org; Thu, 16 Feb 2023 10:54:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSgaC-0007oR-Lw for 61483@debbugs.gnu.org; Thu, 16 Feb 2023 10:54:08 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSga6-0001p2-NS; Thu, 16 Feb 2023 10:53:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=pa+fxN2A/m3+RqloYeCX7v3Qw/e+gOXV+Vz535mw9+I=; b=gdfQyDUZ4hM8sT zx3AGey6q3si1hZcbfoXoy5cnbpNtc1gz9XkH9U9CZDp3w88XAsacMhLfnXRJw3GQXoo8Hvkmfbdx +09LG1KSbVcgyBxLWpVJ2Now6roo0vfjOXpMjR13cDuY9Cnb3CoYgrtOTFpQwA81Q0FoWvWf9qTiT J1p4E1n2ppCX0S4t3lnqu5/ooQQBo93Sv+zTH6p+K4j8H3s4zrI6mAwpEaDo80gE/LaQuTH8CdsVa fVcrCl7H9n+1cMeqxxDEBECQGGWf8qHCP7fpx/NNcFYU0gHbE/B1m51DquEmzjQ4wMaZkkBGvy0Wf rBNiGvDtpPWhW+fABbLA==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1pSga6-0005sK-AV; Thu, 16 Feb 2023 10:53:58 -0500 From: "Jan (janneke) Nieuwenhuizen" To: 61483@debbugs.gnu.org Subject: [PATCH v2 1/5] DRAFT gnu: home: services: Add home-git-daemon-service-type. Date: Thu, 16 Feb 2023 16:53:51 +0100 Message-Id: <20230216155355.11106-1-janneke@gnu.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/home/services/shepherd-xyz.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/home/services/shepherd-xyz.scm | 122 +++++++++++++++++++++++++++++ gnu/local.mk | 3 +- 2 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 gnu/home/services/shepherd-xyz.scm diff --git a/gnu/home/services/shepherd-xyz.scm b/gnu/home/services/shepherd-xyz.scm new file mode 100644 index 0000000000..4d84008dae --- /dev/null +++ b/gnu/home/services/shepherd-xyz.scm @@ -0,0 +1,122 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2023 Janneke Nieuwenhuizen +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu home services shepherd-xyz) + #:use-module (srfi srfi-26) + + #:use-module (ice-9 match) + + #:use-module (shepherd support) + + #:use-module (gnu home services) + #:use-module (gnu home services shepherd) + #:use-module (gnu packages version-control) + #:use-module (gnu services configuration) + #:use-module (gnu services shepherd) + #:use-module (guix records) + #:use-module (guix gexp) + + #:export (home-git-daemon-configuration + home-git-daemon-service-type)) + +;;; Commentary: +;; +;; Home Services for the Shepherd. +;; +;; Example configurations. +;; +;; Git daemon: use $HOME/src as the base directory. +;; +;; (service home-git-service-type +;; (home-git-configuration +;; (root (string-append (getenv "HOME") "/src")))) +;; +;;; Code: + +;;; +;;; Directories. +;;; +(define %user-data-home + ;; Default cache directory if shepherd is run as a normal user. + (string-append (or (getenv "XDG_DATA_HOME") + (string-append user-homedir "/.local/share")))) + +(define %user-log-dir + ;; Default log directory if shepherd is run as a normal user. + (string-append (or (getenv "XDG_DATA_HOME") + (string-append user-homedir "/.local/var/log")))) + + +;;; +;;; Git daemon. +;;; +(define-record-type* + home-git-daemon-configuration make-home-git-daemon-configuration + home-git-daemon-configuration? + (git home-git-daemon-git ;file-like + (default git)) + (root home-git-daemon-root ;string + (default (string-append %user-data-home + "/git-daemon"))) + (export-all? home-git-daemon-export-all? ;boolean + (default #f)) + (listen home-git-daemon-configuration-listen ;list of string + (default '())) + (port home-git-daemon-configuration-port ;number | #f + (default #f)) + (whitelist home-git-daemon-configuration-whitelist ;list of string + (default '())) + (extra-options home-git-daemon-extra-options ;list of string + (default '()))) + +(define (home-git-daemon-services config) + "Return a for a git daemon with CONFIG." + (match config + (($ + git root export-all? listen port whitelist extra-options) + (let* ((git (file-append git "/bin/git")) + (command `(,git + "daemon" + ,(string-append "--base-path=" root) + ,@(if export-all? + '("--export-all") + '()) + ,@(map (cute string-append "--listen=" <>) listen) + ,@(if port + `(,(string-append + "--port=" (number->string port))) + '()) + ,@extra-options + ,@whitelist)) + (log-file (string-append %user-log-dir "/git-daemon.log"))) + (list (shepherd-service + (documentation "Run the git daemon.") + (provision '(git-daemon)) + (start #~(make-forkexec-constructor '#$command + #:log-file #$log-file)) + (stop #~(make-kill-destructor)))))))) + +(define home-git-daemon-service-type + (service-type + (name 'home-git-daemon) + (default-value (home-git-daemon-configuration)) + (extensions + (list (service-extension home-shepherd-service-type + home-git-daemon-services))) + (description + "Install and configure the git-daemon as a shepherd service."))) diff --git a/gnu/local.mk b/gnu/local.mk index 7278c50e4f..134b81f24f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -11,7 +11,7 @@ # Copyright © 2016 Ben Woodcroft # Copyright © 2016, 2017, 2018, 2019 Alex Vong # Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner -# Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022 Jan (janneke) Nieuwenhuizen +# Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Jan (janneke) Nieuwenhuizen # Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice # Copyright © 2017, 2018 Clément Lassieur # Copyright © 2017, 2020 Mathieu Othacehe @@ -94,6 +94,7 @@ GNU_SYSTEM_MODULES = \ %D%/home/services/pm.scm \ %D%/home/services/shells.scm \ %D%/home/services/shepherd.scm \ + %D%/home/services/shepherd-xyz.scm \ %D%/home/services/ssh.scm \ %D%/home/services/mcron.scm \ %D%/home/services/utils.scm \ -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 10:54:10 2023 Received: (at 61483) by debbugs.gnu.org; 16 Feb 2023 15:54:11 +0000 Received: from localhost ([127.0.0.1]:37440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSgaI-0007pR-CX for submit@debbugs.gnu.org; Thu, 16 Feb 2023 10:54:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSgaD-0007oT-48 for 61483@debbugs.gnu.org; Thu, 16 Feb 2023 10:54:08 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSga7-0001pl-TK; Thu, 16 Feb 2023 10:53:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=hB0p3TfSrAjUVBANcBO1gggY14jVh5JP0QxcBCvsizw=; b=a2/rCF0DgWufX5QbVPOp 19a26uJAbK8VmByu+wI2u5pYndASUjgvEle+Ewwf2aOkFhNSVHxu5w6bBINfi1qJ7KoyNWaFM41zU z3NKdx2W8aOgbH4mR+0ahJFOVsc98caOQt449yMFr++rXNNvCwhm/eZorqvuU096B9P3kwzzcyp8x KettEAMRI/7HKkjxqK723U8rIwxRoyrLoK84ao89vwvjlni0QLXIVfrSr0ZRmiV/Db7RqDFD6qxsp /ZsGYJIWZvVlKc3H/APLEH+/6IgaLz5ILA2OtYrLgJ7o0R5Sc/DDyxVarlo/cdBizXFokcuFDWEpk 7Uw8S6zBJdZfkg==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1pSga7-0005sK-Gd; Thu, 16 Feb 2023 10:53:59 -0500 From: "Jan (janneke) Nieuwenhuizen" To: 61483@debbugs.gnu.org Subject: [PATCH v2 3/5] DRAFT gnu: home: services: Add home-znc-service-type. Date: Thu, 16 Feb 2023 16:53:53 +0100 Message-Id: <20230216155355.11106-3-janneke@gnu.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230216155355.11106-1-janneke@gnu.org> References: <20230216155355.11106-1-janneke@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/home/services/shepherd-xyz.scm (): New type. (home-znc-services): New procedure. (home-znc-service-type): New variable. --- gnu/home/services/shepherd-xyz.scm | 43 +++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/gnu/home/services/shepherd-xyz.scm b/gnu/home/services/shepherd-xyz.scm index 75f3770ffc..856a5e7246 100644 --- a/gnu/home/services/shepherd-xyz.scm +++ b/gnu/home/services/shepherd-xyz.scm @@ -25,6 +25,7 @@ (define-module (gnu home services shepherd-xyz) #:use-module (gnu home services) #:use-module (gnu home services shepherd) + #:use-module (gnu packages messaging) #:use-module (gnu packages ssh) #:use-module (gnu packages version-control) #:use-module (gnu services configuration) @@ -35,7 +36,9 @@ (define-module (gnu home services shepherd-xyz) #:export (home-git-daemon-configuration home-git-daemon-service-type home-ssh-agent-configuration - home-ssh-agent-service-type)) + home-ssh-agent-service-type + home-znc-configuration + home-znc-service-type)) ;;; Commentary: ;; @@ -178,3 +181,41 @@ (define home-ssh-agent-service-type home-ssh-agent-services))) (description "Install and configure the ssh-agent as a shepherd service."))) + + +;;; +;;; Znc. +;;; +(define-record-type* + home-znc-configuration make-home-znc-configuration + home-znc-configuration? + (znc home-znc-znc ;string + (default znc)) + (extra-options home-znc-extra-options ;list of string + (default '()))) + +(define (home-znc-services config) + "Return a for znc with CONFIG." + (match config + (($ znc extra-options) + (let* ((znc (file-append znc "/bin/znc")) + (command `(,znc + "--foreground" + ,@extra-options)) + (log-file (string-append %user-log-dir "/znc.log"))) + (list (shepherd-service + (documentation "Run the znc IRC bouncer.") + (provision '(znc)) + (start #~(make-forkexec-constructor '#$command + #:log-file #$log-file)) + (stop #~(make-kill-destructor)))))))) + +(define home-znc-service-type + (service-type + (name 'home-znc) + (default-value (home-znc-configuration)) + (extensions + (list (service-extension home-shepherd-service-type + home-znc-services))) + (description + "Install and configure znc as a shepherd service."))) -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 10:54:11 2023 Received: (at 61483) by debbugs.gnu.org; 16 Feb 2023 15:54:11 +0000 Received: from localhost ([127.0.0.1]:37442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSgaI-0007pZ-Rs for submit@debbugs.gnu.org; Thu, 16 Feb 2023 10:54:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSgaC-0007oS-R5 for 61483@debbugs.gnu.org; Thu, 16 Feb 2023 10:54:08 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSga7-0001pO-JG; Thu, 16 Feb 2023 10:53:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=L+lo8S04XJBPLC5vtryLUI7wdCr9sa161XSGtkC+sn8=; b=sHpDL1LD4irO+NJXEJ/0 nTeLR5qsMdC6Bf/pNiMHEjIcabTSnloWer4Xwp3Qz3pWmQP3iFCQi2DsDi9rqC9tHpphAqyrE3Xin BplKiR3E73b7UMmvxHTDcADK2zY6J78aShwz2vE0p67qlVgihQE1awNhrDhYYDLLdY7uyJBXwVMrK eVvfnwL2l8rrt4tIpL6YaPTgtdSKd5b941JXGM1lWjKonzmC5EH3PurnJgKSzux9bVJWgNiIvJuH9 WkDmqnhakvh+2WMPgWPk6+UsTLw4M2u8MWtP9jDHCraSD1vQYWS8iaW/jePBRzTHdHnZS0RbNHrYR L04sTp2NgLar8g==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1pSga6-0005sK-Tn; Thu, 16 Feb 2023 10:53:59 -0500 From: "Jan (janneke) Nieuwenhuizen" To: 61483@debbugs.gnu.org Subject: [PATCH v2 2/5] DRAFT gnu: home: services: Add home-ssh-agent-service-type. Date: Thu, 16 Feb 2023 16:53:52 +0100 Message-Id: <20230216155355.11106-2-janneke@gnu.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230216155355.11106-1-janneke@gnu.org> References: <20230216155355.11106-1-janneke@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/home/services/shepherd-xyz.scm (): New type. (home-ssh-agent-services): New procedure. (home-ssh-agent-service-type): New variable. --- gnu/home/services/shepherd-xyz.scm | 60 +++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/gnu/home/services/shepherd-xyz.scm b/gnu/home/services/shepherd-xyz.scm index 4d84008dae..75f3770ffc 100644 --- a/gnu/home/services/shepherd-xyz.scm +++ b/gnu/home/services/shepherd-xyz.scm @@ -25,6 +25,7 @@ (define-module (gnu home services shepherd-xyz) #:use-module (gnu home services) #:use-module (gnu home services shepherd) + #:use-module (gnu packages ssh) #:use-module (gnu packages version-control) #:use-module (gnu services configuration) #:use-module (gnu services shepherd) @@ -32,7 +33,9 @@ (define-module (gnu home services shepherd-xyz) #:use-module (guix gexp) #:export (home-git-daemon-configuration - home-git-daemon-service-type)) + home-git-daemon-service-type + home-ssh-agent-configuration + home-ssh-agent-service-type)) ;;; Commentary: ;; @@ -46,6 +49,15 @@ (define-module (gnu home services shepherd-xyz) ;; (home-git-configuration ;; (root (string-append (getenv "HOME") "/src")))) ;; +;; Ssh-agent +;; +;; Add to your ~/.bash_profile: +;; +;; SSH_AUTH_SOCK=${XDG_RUNTIME_DIR-$HOME/.cache}/ssh-agent/socket +;; export SSH_AUTH_SOCK +;; +;; (service home-ssh-agent-service-type) +;; ;;; Code: ;;; @@ -120,3 +132,49 @@ (define home-git-daemon-service-type home-git-daemon-services))) (description "Install and configure the git-daemon as a shepherd service."))) + + +;;; +;;; Ssh-agent. +;;; +(define-record-type* + home-ssh-agent-configuration make-home-ssh-agent-configuration + home-ssh-agent-configuration? + (openssh home-ssh-agent-openssh ;file-like + (default openssh)) + (socket-dir home-ssh-agent-socket-dir ;string + (default (string-append %user-runtime-dir "/ssh-agent"))) + (extra-options home-ssh-agent-extra-options ;list of string + (default '()))) + +(define (home-ssh-agent-services config) + "Return a for an ssh-agent with CONFIG." + (match config + (($ + openssh socket-dir extra-options) + (let* ((ssh-agent (file-append openssh "/bin/ssh-agent")) + (socket-file (string-append socket-dir "/socket")) + (command `(,ssh-agent + "-D" + "-a" ,socket-file + ,@extra-options)) + (log-file (string-append %user-log-dir "/ssh-agent.log"))) + (list (shepherd-service + (documentation "Run the ssh-agent.") + (provision '(ssh-agent)) + (start #~(lambda _ + (unless (file-exists? #$socket-dir) + (mkdir-p #$socket-dir) + (chmod #$socket-dir #o700)) + (fork+exec-command '#$command #:log-file #$log-file))) + (stop #~(make-kill-destructor)))))))) + +(define home-ssh-agent-service-type + (service-type + (name 'home-ssh-agent) + (default-value (home-ssh-agent-configuration)) + (extensions + (list (service-extension home-shepherd-service-type + home-ssh-agent-services))) + (description + "Install and configure the ssh-agent as a shepherd service."))) -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 10:54:11 2023 Received: (at 61483) by debbugs.gnu.org; 16 Feb 2023 15:54:11 +0000 Received: from localhost ([127.0.0.1]:37444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSgaJ-0007pg-BN for submit@debbugs.gnu.org; Thu, 16 Feb 2023 10:54:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSgaD-0007oV-NI for 61483@debbugs.gnu.org; Thu, 16 Feb 2023 10:54:09 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSga8-0001qx-G9; Thu, 16 Feb 2023 10:54:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=SVGJG9C3NNPuEt13r6+srnkyIjOsnCOaX/DbtFNKPA0=; b=TW2V+XJEN76rD+Hffw3L 9VZLjTOmNCTXI5nHt+mdOmNwy2gj/OkMEhm0a14UQ9SbXuSUh8GcqcEm2aZrssCDlI3onE5cJQ6qm HrEgGv44KIZ7oQBdMd3RJyqkMbFTgxC4jNOXMslWpdWOsjC5O4c4NZMZZinKskeqwuop8kIAf+SHB Lns/GuUyJelZPn0oymnXc7s1NLGPQeYHEL6k6fudXnV4yiorjqY9VNcJOevRREADJ+HmniEhoJbMH Mv6ue46NBsHUOSH8Xx05K1yg7HLGvbcjy8F+xVScqBCSbwGBM0f+ZFIUt4UzMuvOlV2gPfSQYh+ua fEaq8IxNjouY5w==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1pSga8-0005sK-3W; Thu, 16 Feb 2023 10:54:00 -0500 From: "Jan (janneke) Nieuwenhuizen" To: 61483@debbugs.gnu.org Subject: [PATCH v2 4/5] DRAFT gnu: home: services: Add home-kodi-service-type. Date: Thu, 16 Feb 2023 16:53:54 +0100 Message-Id: <20230216155355.11106-4-janneke@gnu.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230216155355.11106-1-janneke@gnu.org> References: <20230216155355.11106-1-janneke@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/home/services/shepherd-xyz.scm (): New type. (home-kodi-services): New procedure. (home-kodi-service-type): New variable. --- gnu/home/services/shepherd-xyz.scm | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gnu/home/services/shepherd-xyz.scm b/gnu/home/services/shepherd-xyz.scm index 856a5e7246..f5bedf60c7 100644 --- a/gnu/home/services/shepherd-xyz.scm +++ b/gnu/home/services/shepherd-xyz.scm @@ -25,6 +25,7 @@ (define-module (gnu home services shepherd-xyz) #:use-module (gnu home services) #:use-module (gnu home services shepherd) + #:use-module (gnu packages kodi) #:use-module (gnu packages messaging) #:use-module (gnu packages ssh) #:use-module (gnu packages version-control) @@ -35,6 +36,8 @@ (define-module (gnu home services shepherd-xyz) #:export (home-git-daemon-configuration home-git-daemon-service-type + home-kodi-configuration + home-kodi-service-type home-ssh-agent-configuration home-ssh-agent-service-type home-znc-configuration @@ -136,6 +139,44 @@ (define home-git-daemon-service-type (description "Install and configure the git-daemon as a shepherd service."))) + +;;; +;;; Kodi. +;;; +(define-record-type* + home-kodi-configuration make-home-kodi-configuration + home-kodi-configuration? + (kodi home-kodi-kodi ;file-like + (default kodi)) + (extra-options home-kodi-extra-options ;list of string + (default '()))) + +(define (home-kodi-services config) + "Return a for kodi with CONFIG." + (match config + (($ kodi extra-options) + (let* ((kodi (file-append kodi "/bin/kodi")) + (command `(kodi + "-fs" + ,@extra-options)) + (log-file (string-append %user-log-dir "/kodi.log"))) + (list (shepherd-service + (documentation "Run the kodi media center.") + (provision '(kodi)) + (start #~(make-forkexec-constructor '#$command + #:log-file #$log-file)) + (stop #~(make-kill-destructor)))))))) + +(define home-kodi-service-type + (service-type + (name 'home-kodi) + (default-value (home-kodi-configuration)) + (extensions + (list (service-extension home-shepherd-service-type + home-kodi-services))) + (description + "Install and configure kodi as a shepherd service."))) + ;;; ;;; Ssh-agent. -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 10:54:12 2023 Received: (at 61483) by debbugs.gnu.org; 16 Feb 2023 15:54:12 +0000 Received: from localhost ([127.0.0.1]:37446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSgaJ-0007pq-Pp for submit@debbugs.gnu.org; Thu, 16 Feb 2023 10:54:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSgaF-0007oZ-Ib for 61483@debbugs.gnu.org; Thu, 16 Feb 2023 10:54:09 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSga9-0001rO-3P; Thu, 16 Feb 2023 10:54:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=Nn7j/M8bUio0dzRQN4+NLfKH4ZNvCjPyZRnn3dgIYeI=; b=BN9cq9jhIbcgQ09fL78a npPojfd9LvJ0f9vNmE5+Xl7fsmfP6F5JoFcChNywcNCsqd0AkQ1KpL+SVvjAc4JLsgBO/StBuoIQJ ijU9GQepVP/iJWXzWSIPzRyqHSzrOLaW1EDQemoVnFtrP7bsadbVa51jBoBhSbYjCQeo2SGqXSB6G CPqJdvPNKPd1uqFqPl8Nkh5vTeZ98uAznq1x/otSX0c15ubWNDCU1l6NFNQ+d8UDuZoDqjt5zqggC QX/XwNf4dbvs7lJrXOGqG+Sf8B7F+JtrDmrwsv6r5RCcJFtdrwy8Bl0O4+ERIDjnEYYY8Im1KggeP yCW2X5VGmu8Ftw==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1pSga8-0005sK-Ma; Thu, 16 Feb 2023 10:54:00 -0500 From: "Jan (janneke) Nieuwenhuizen" To: 61483@debbugs.gnu.org Subject: [PATCH v2 5/5] DRAFT doc: Document Home Shepherd Services. Date: Thu, 16 Feb 2023 16:53:55 +0100 Message-Id: <20230216155355.11106-5-janneke@gnu.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230216155355.11106-1-janneke@gnu.org> References: <20230216155355.11106-1-janneke@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * doc/guix.texi (Shepherd Home Services): New subsubsection. --- doc/guix.texi | 124 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 123 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 784114f0bb..a5a62010b6 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -36,7 +36,7 @@ Copyright @copyright{} 2016, 2017, 2018, 2021 Chris Marusich@* Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner@* Copyright @copyright{} 2016 John Darrington@* Copyright @copyright{} 2016, 2017 Nikita Gillmann@* -Copyright @copyright{} 2016, 2017, 2018, 2019, 2020 Jan Nieuwenhuizen@* +Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2023 Jan Nieuwenhuizen@* Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Julien Lepiller@* Copyright @copyright{} 2016 Alex ter Weele@* Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Christopher Baines@* @@ -41285,6 +41285,128 @@ mechanism instead (@pxref{Shepherd Services}). @end table @end deftp +@menu +* Shepherd Home Services:: +@end menu + +@node Shepherd Home Services +@subsubsection e Shepherd Home Services + +The @code{(gnu home services shepherd-xyz)} module provides serveral +home shepherd services. + +@defvr {Scheme Variable} home-git-daemon-service-type +This is the type of the @code{git daemon} home service, whose value is an +@code{home-git-daemon-configuration} object. +@end defvr + +@deftp {Data Type} home-git-daemon-configuration +Available @code{home-git-daemon-configuration} fields are: + +@table @asis +@item @code{git} (default: @code{git}) (type: file-like) +The git package to use. + +@item @code{root} (default: @file{@env{XDG_DATA_HOME}/git-daemon}) (type: string) +The git deamon's base directory. + +@item @code{export-all?} (default: @code{#f}) +Whether to allow access for all Git repositories, even if they do not +have the @file{git-daemon-export-ok} file. + +@item @code{base-path} (default: @file{/srv/git}) +Whether to remap all the path requests as relative to the given path. +If you run @command{git daemon} with @code{(base-path "/srv/git")} on +@samp{example.com}, then if you later try to pull +@indicateurl{git://example.com/hello.git}, git daemon will interpret the +path as @file{/srv/git/hello.git}. + +@item @code{user-path} (default: @code{#f}) +Whether to allow @code{~user} notation to be used in requests. When +specified with empty string, requests to +@indicateurl{git://host/~alice/foo} is taken as a request to access +@code{foo} repository in the home directory of user @code{alice}. If +@code{(user-path "@var{path}")} is specified, the same request is taken +as a request to access @file{@var{path}/foo} repository in the home +directory of user @code{alice}. + +@item @code{listen} (default: @code{'()}) +Whether to listen on specific IP addresses or hostnames, defaults to +all. + +@item @code{port} (default: @code{#f}) +Whether to listen on an alternative port, which defaults to 9418. + +@item @code{whitelist} (default: @code{'()}) +If not empty, only allow access to this list of directories. + +@item @code{extra-options} (default: @code{'()}) +Extra options will be passed to @command{git daemon}, please run +@command{man git-daemon} for more information. + +@end table +@end deftp + +@defvr {Scheme Variable} home-kodi-service-type +This is the type of the @code{git daemon} home service, whose value is an +@code{home-kodi-configuration} object. +@end defvr + +@deftp {Data Type} home-kodi-configuration +Available @code{home-kodi-configuration} fields are: + +@table @asis +@item @code{git} (default: @code{git}) (type: file-like) +The git package to use. + +@item @code{extra-options} (default: @code{'()}) +Extra options will be passed to @command{kodi}, please run @command{man +kodi} for more information. + +@end table +@end deftp + +@defvr {Scheme Variable} home-ssh-agent-service-type +This is the type of the @code{git daemon} home service, whose value is an +@code{home-ssh-agent-configuration} object. +@end defvr + +@deftp {Data Type} home-ssh-agent-configuration +Available @code{home-ssh-agent-configuration} fields are: + +@table @asis +@item @code{git} (default: @code{git}) (type: file-like) +The git package to use. + +@item @code{socket-dir} (default: @code{@env{XDG_RUNTIME_DIR}/ssh-agent"}) (type: string) +The directory to write the ssh-agent's @file{socket} file. + +@item @code{extra-options} (default: @code{'()}) +Extra options will be passed to @command{ssh-agent}, please run +@command{man ssh-agent} for more information. + +@end table +@end deftp + +@defvr {Scheme Variable} home-znc-service-type +This is the type of the @code{git daemon} home service, whose value is an +@code{home-znc-configuration} object. +@end defvr + +@deftp {Data Type} home-znc-configuration +Available @code{home-znc-configuration} fields are: + +@table @asis +@item @code{git} (default: @code{git}) (type: file-like) +The git package to use. + +@item @code{extra-options} (default: @code{'()}) +Extra options will be passed to @command{znc}, please run @command{man +znc} for more information. + +@end table +@end deftp + @node Secure Shell @subsection Secure Shell -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 04 12:01:15 2023 Received: (at 61483) by debbugs.gnu.org; 4 Mar 2023 17:01:15 +0000 Received: from localhost ([127.0.0.1]:37578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYVFz-0006D0-08 for submit@debbugs.gnu.org; Sat, 04 Mar 2023 12:01:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYVFw-0006Cm-Ee for 61483@debbugs.gnu.org; Sat, 04 Mar 2023 12:01:12 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYVFr-0006qx-0D; Sat, 04 Mar 2023 12:01:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Ms4+nOxfbty5s/Nk253gbpVKJM5HKNwHsrNwe/Gp1BU=; b=JK9Z2LLcrKdB6zPSCGfu HsvShAbpaDdmRcm7pRPUORx+gJ4V6qFRA9quC4vc7D9+/obdIRtXm4Sr9SFWR18uXlRTGHyy5pDl6 vFsgYrKKT2UV20Enkcnxko4TkOss20SCvhNUkyovv2S4Yaqv/1dMqcMvo7f2hybEhCXTyli3eXoRo luNaxQbWrPtu9CHkjJSu4i9Ibg2UU/ZlLoii0a6/seAu81jM4WUDbLDHJB3b5I4+G4AVZOX2Y+Qdt 6ACzLKzM840t3yWPm3Yvk2W/HPt/hJg0nWtRzxRljIq8nefyfmgcAbUUu5W2h/qB5mJTzjeLHKMHS FgD+fvA+eIFxMg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYVFq-0006mZ-9n; Sat, 04 Mar 2023 12:01:06 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "Jan (janneke) Nieuwenhuizen" Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services References: <20230213164642.24419-1-janneke@gnu.org> Date: Sat, 04 Mar 2023 18:01:04 +0100 In-Reply-To: <20230213164642.24419-1-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Mon, 13 Feb 2023 17:46:42 +0100") Message-ID: <871qm4sb73.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Howdy! "Jan (janneke) Nieuwenhuizen" skribis: > I've been waiting for Guix Home to offer some basic shepherd services for= most > used daemons, replacing the neat shepherd hack described in > > https://guix.gnu.org/en/blog/2020/gnu-shepherd-user-services/ > > that I've been using, and am a bit puzzled as to why this didn't happen. = Are > people using Guix Home? I am! :-) Possible reasons not all the services described there made it into Guix Home: (1) needs vary :-), (2) it=E2=80=99s possible to migrate incrementall= y, with some things handled with Home while others are still managed =E2=80=9C= the old way=E2=80=9D (that=E2=80=99s what I do), and (3) rde is kinda =E2=80=9C= competing=E2=80=9D with Home by providing a whole bunch of services, giving less of an incentive to migrate them (it=E2=80=99s an unfortunate issue we identified at the time H= ome got merged). But with contributions like these, the situation will improve! > Anyway, here's my attempt to address this, adding ssh-agent, git-daemon, = and > also the probably less-used kodi and znc that I use on my home server. Nice. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 04 12:05:14 2023 Received: (at 61483) by debbugs.gnu.org; 4 Mar 2023 17:05:14 +0000 Received: from localhost ([127.0.0.1]:37583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYVJp-0006IY-Kb for submit@debbugs.gnu.org; Sat, 04 Mar 2023 12:05:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYVJo-0006IJ-6e for 61483@debbugs.gnu.org; Sat, 04 Mar 2023 12:05:12 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYVJi-0007jG-7f; Sat, 04 Mar 2023 12:05:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=otSCVKBhO6E9Vz/6ZjtTC27IfQTV2uAOs4+3U2auixQ=; b=JfaRc5HUVgJCm4PhxK9G LhGEMrwerd97ans/6lbedZXh3QNeHaqHxZ99SMTIlK5SQhtjdbAKECaLZL/LzKyJ7WVsHvR1zUecV Sql3XMZ2K1iZFM0C/WAXv+LFwDM1gk5ehOxVNGrmGlgHf31yQck33dBbKGuAHlJ5wDDzobhXKnhMb m/DlpX0nGXWZxsQSa/AXSimE+pfLB8Jhq5LdbpzlQbDJZUPZjtrcNWl+Qka+72b7bfvaLXFVeoWWp 3kaKOdgDJoUP2XWp5XN8JfSkRFo0vQmBvcvHcYKZD5Vl5Ovi/Y3dRJMGplQOFHnzjq7rtTKtaoloU 4d3iUO3mBrR/mA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYVJh-0003GR-2g; Sat, 04 Mar 2023 12:05:05 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "Jan (janneke) Nieuwenhuizen" Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services References: <20230213164642.24419-1-janneke@gnu.org> <20230216155355.11106-1-janneke@gnu.org> Date: Sat, 04 Mar 2023 18:05:02 +0100 In-Reply-To: <20230216155355.11106-1-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Thu, 16 Feb 2023 16:53:51 +0100") Message-ID: <87v8jgqwg1.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "Jan (janneke) Nieuwenhuizen" skribis: > * gnu/home/services/shepherd-xyz.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. I=E2=80=99d make it version-control.scm instead. > +(define-record-type* > + home-git-daemon-configuration make-home-git-daemon-configuration > + home-git-daemon-configuration? > + (git home-git-daemon-git ;file-like > + (default git)) > + (root home-git-daemon-root ;string > + (default (string-append %user-data-home > + "/git-daemon"))) > + (export-all? home-git-daemon-export-all? ;boolean > + (default #f)) > + (listen home-git-daemon-configuration-listen ;list of string > + (default '())) > + (port home-git-daemon-configuration-port ;number | #f > + (default #f)) > + (whitelist home-git-daemon-configuration-whitelist ;list of string > + (default '())) > + (extra-options home-git-daemon-extra-options ;list of string > + (default '()))) > + > +(define (home-git-daemon-services config) > + "Return a for a git daemon with CONFIG." > + (match config > + (($ > + git root export-all? listen port whitelist extra-options) > + (let* ((git (file-append git "/bin/git")) > + (command `(,git > + "daemon" > + ,(string-append "--base-path=3D" root) > + ,@(if export-all? > + '("--export-all") > + '()) > + ,@(map (cute string-append "--listen=3D" <>) list= en) > + ,@(if port > + `(,(string-append > + "--port=3D" (number->string port))) > + '()) > + ,@extra-options > + ,@whitelist)) > + (log-file (string-append %user-log-dir "/git-daemon.log"))) > + (list (shepherd-service > + (documentation "Run the git daemon.") > + (provision '(git-daemon)) > + (start #~(make-forkexec-constructor '#$command > + #:log-file #$log-file)) > + (stop #~(make-kill-destructor)))))))) I have a prototype here to =E2=80=9Ctransform=E2=80=9D a System service int= o a Home service. Would it be of any use here, to share code with =E2=80=98git-daemon-service-type=E2=80=99? Looks like the only issue would be #:user "git-daemon", which is not going to work, and I don=E2=80=99t have a good solution to that. :-/ Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 04 12:06:36 2023 Received: (at 61483) by debbugs.gnu.org; 4 Mar 2023 17:06:36 +0000 Received: from localhost ([127.0.0.1]:37589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYVLA-0006Kc-3w for submit@debbugs.gnu.org; Sat, 04 Mar 2023 12:06:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYVL8-0006KR-Ro for 61483@debbugs.gnu.org; Sat, 04 Mar 2023 12:06:35 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYVL3-0007yV-BD; Sat, 04 Mar 2023 12:06:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=N4gqhdA7E+pvR3iHEMEgbce+kbOqG2GbwHDByaoOVks=; b=RRoRHGXN4yCdhpnNdjF7 7yyx+lz9f58p0uwj2MiaJ8VVWwFEF0Vai02aIJVMN9MLkpBXbTqXAQRymnxMFNMefbM4KjS0aTT0K J03obgT5jLZRTLeHl7kybm3pwcuYdkYgV1Bucy1nJrS5yXmnhmjChRBk1dkrk/8fTaoSGNDIW+sMe YV8klpRzKT63tyKNRmaY5mq0sqz1GoPzqkrsE1/5vvEii1qLJ1ElLYTwisYpBYYYa7u2hM9IPS98V j5W9NTapoJlYTG/opKGaOrxWG6//nSytEuM5EXBQ/7kn+CoW/F3kg0GKgci/Zo2qh3QYn9l2Y0p34 KsH0tyKR1a2ffw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYVL2-0001O3-Lo; Sat, 04 Mar 2023 12:06:28 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "Jan (janneke) Nieuwenhuizen" Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services References: <20230216155355.11106-1-janneke@gnu.org> <20230216155355.11106-3-janneke@gnu.org> Date: Sat, 04 Mar 2023 18:06:27 +0100 In-Reply-To: <20230216155355.11106-3-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Thu, 16 Feb 2023 16:53:53 +0100") Message-ID: <87r0u4qwdo.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "Jan (janneke) Nieuwenhuizen" skribis: > * gnu/home/services/shepherd-xyz.scm > (): New type. > (home-znc-services): New procedure. > (home-znc-service-type): New variable. I=E2=80=99d make it =E2=80=98messaging.scm=E2=80=99. With that an entry in the manual, it will be ready to go! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 04 12:08:18 2023 Received: (at 61483) by debbugs.gnu.org; 4 Mar 2023 17:08:18 +0000 Received: from localhost ([127.0.0.1]:37596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYVMo-0006NF-HR for submit@debbugs.gnu.org; Sat, 04 Mar 2023 12:08:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYVMm-0006N2-IO for 61483@debbugs.gnu.org; Sat, 04 Mar 2023 12:08:16 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYVMh-0008BX-C6; Sat, 04 Mar 2023 12:08:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=36w2rvfieRx6NeE4Y6bOvn6cC7qHGUgca/flCoMVVZI=; b=IgXG2mNDHCF3n13n0HR+ PxAQB/rgkRkqGZinbhrxlAsfk/8GBX5WdGltp1E4oxGoyLoOa8/CcPo8miOFVWkaTOEAI/DV0Dvlx /ZmCen3YqWyl/HO1BUqPW32DZ+gTxupftYOgIr2WePpCiMlRiYHWCJPcLgq+TsMhFNV/s9QK/+xRM bcMdo92wOXBq8GYXPhLWSVNm0UCvKaafTGrjySZoRicOAmYa5P5xj0zliBGPSqFB/WL6kEW4pHz6I QG0sbTAuTlQr/SZ+XgnC5IGdJj6Hs7a6wP6JXCFwFAhuCkUfZ/r3aoy2P/VP72jmrwkVuSRfIyYEn 8k0TjNbtexn1LA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYVMg-0003LL-Nv; Sat, 04 Mar 2023 12:08:10 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "Jan (janneke) Nieuwenhuizen" Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services References: <20230216155355.11106-1-janneke@gnu.org> <20230216155355.11106-2-janneke@gnu.org> Date: Sat, 04 Mar 2023 18:08:09 +0100 In-Reply-To: <20230216155355.11106-2-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Thu, 16 Feb 2023 16:53:52 +0100") Message-ID: <87mt4sqwau.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "Jan (janneke) Nieuwenhuizen" skribis: > * gnu/home/services/shepherd-xyz.scm > (): New type. > (home-ssh-agent-services): New procedure. > (home-ssh-agent-service-type): New variable. Rather in =E2=80=98ssh.scm=E2=80=99 IMO. > + (socket-dir home-ssh-agent-socket-dir ;string Rather s/socket-dir/socket-directory/ > + (description > + "Install and configure the ssh-agent as a shepherd service."))) =E2=80=9CInstall and configure @command{ssh-agent} as a Shepherd service.= =E2=80=9D With these changes and an entry in the manual, we=E2=80=99re all set! From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 04 12:10:30 2023 Received: (at 61483) by debbugs.gnu.org; 4 Mar 2023 17:10:30 +0000 Received: from localhost ([127.0.0.1]:37601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYVOw-0006QV-0m for submit@debbugs.gnu.org; Sat, 04 Mar 2023 12:10:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYVOu-0006QJ-AQ for 61483@debbugs.gnu.org; Sat, 04 Mar 2023 12:10:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYVOn-00009F-UX; Sat, 04 Mar 2023 12:10:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=3O++SpkYxJIZB9MnwEF2Fo3f2zW2Q6l6HcRAwxs6g+8=; b=jSJtNcyDCS2QJJvWsmmn Zd3EcKsLANuLEzoysitRKFTcA1q2wfoOFfG3PuEZswAFVHBPcM2E4mouX2+Ih/byE3b3tZjiK+RIe LGO6QyRPif99etfmj0MfYf+fVNGpP1toaoIzBHqvMABIKO+JEI2RyxHAa8U7gfYMZCsX1rlZymgn0 CDzvFtK4xwAInMhhj+7kglUfeSijdaVaSLvhI2jmra3cfs6JqSKJm9hy3jsND+0/ixH47zDEaxvxa m2pFuda2hOBR9zzeFk/4q50nJlgQQE417A/6+PAdun9CldMsQpo75HQy567PBpxZODOwcOtQCDC/x FsWd+ixnqyLHHQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYVOn-0006SU-2z; Sat, 04 Mar 2023 12:10:21 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "Jan (janneke) Nieuwenhuizen" Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services References: <20230216155355.11106-1-janneke@gnu.org> <20230216155355.11106-4-janneke@gnu.org> Date: Sat, 04 Mar 2023 18:10:19 +0100 In-Reply-To: <20230216155355.11106-4-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Thu, 16 Feb 2023 16:53:54 +0100") Message-ID: <87ilfgqw78.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "Jan (janneke) Nieuwenhuizen" skribis: > * gnu/home/services/shepherd-xyz.scm > (): New type. > (home-kodi-services): New procedure. > (home-kodi-service-type): New variable. Rather =E2=80=98media.scm=E2=80=99? > +(define home-kodi-service-type > + (service-type > + (name 'home-kodi) > + (default-value (home-kodi-configuration)) > + (extensions > + (list (service-extension home-shepherd-service-type > + home-kodi-services))) > + (description > + "Install and configure kodi as a shepherd service."))) Maybe something like: =E2=80=9CInstall and configure the Kodi media center = so that it runs as a Shepherd service.=E2=80=9D Likewise: this + manual entry and we=E2=80=99re all set IMO! From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 04 12:14:38 2023 Received: (at 61483) by debbugs.gnu.org; 4 Mar 2023 17:14:38 +0000 Received: from localhost ([127.0.0.1]:37617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYVSv-0006Wo-OF for submit@debbugs.gnu.org; Sat, 04 Mar 2023 12:14:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYVSt-0006Wb-Ls for 61483@debbugs.gnu.org; Sat, 04 Mar 2023 12:14:36 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYVSo-0000cD-Cf; Sat, 04 Mar 2023 12:14:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=s5iC9wD02+Y0Vx75RfMrMHufaeyj6XOfBjKZsUHnTYo=; b=r4jygwC+HAQHnq9WiboF MjA6e/5cwuWTE13hMn6z9OemtHqWsFUDGUF5KYnzaMF93ovsckFH0Oje0pskBC+SMKgJTBzBzXF2X /RXPlbJPbROgeeczlOnAomsHPWtp07TBzdjDv4dVTZEyEALp9GLiRgWn5rKeha8OgFvkLiMxDMzSp KZ4anFo4ohD+OKNVDjj3RaazmGYagY2VEt4pokwbgsNsBFEG7hThEXUO5040P1AyHCwNrEgII2xDZ wt4LRdzm/jMvjIaQfD7UwuJGocw6MNQxbv33v9Fern/cJrOIQ4LWACIm40KymwbjEB355saauHVep MR2Bk8d5Mdyttg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYVSn-0005fd-Nl; Sat, 04 Mar 2023 12:14:29 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "Jan (janneke) Nieuwenhuizen" Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services References: <20230216155355.11106-1-janneke@gnu.org> <20230216155355.11106-5-janneke@gnu.org> Date: Sat, 04 Mar 2023 18:14:28 +0100 In-Reply-To: <20230216155355.11106-5-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Thu, 16 Feb 2023 16:53:55 +0100") Message-ID: <87edq4qw0b.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "Jan (janneke) Nieuwenhuizen" skribis: > * doc/guix.texi (Shepherd Home Services): New subsubsection. Oooh, I totally overlooked this. Overall I=E2=80=99d suggest documenting in the patch that adds the service. That way, each change is self-contained, which facilitates review, etc. I would suggest creating one section per type, roughly corresponding to the (gnu home services =E2=80=A6) module: =E2=80=9CMedia=E2=80=9D, =E2=80= =9CVersion Control=E2=80=9D, etc. For SSH there=E2=80=99s already =E2=80=9CSecure Shell=E2=80=9D. Also please start each service=E2=80=99s documentation with a couple of sentences giving context and possibly an example, similar to what=E2=80=99s= done for the existing Home services. Could you send an updated patch series, maybe leaving out git-daemon until we figure out whether/how to factorize it? Thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 05 12:41:35 2023 Received: (at 61483) by debbugs.gnu.org; 5 Mar 2023 17:41:35 +0000 Received: from localhost ([127.0.0.1]:40572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYsMZ-0007JP-5h for submit@debbugs.gnu.org; Sun, 05 Mar 2023 12:41:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYsMX-0007JC-LW for 61483@debbugs.gnu.org; Sun, 05 Mar 2023 12:41:34 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYsMQ-0002K3-Nt; Sun, 05 Mar 2023 12:41:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=yp+PB2HoKjnY1YEyjTZW1HDZ0jIx7OkYzwaiKvld48M=; b=o2/en0xGxSGDhZn9KmSI rW6SAJBWDAj5Smi7U4CllqTfcfuTspHFG5wB/ghXoHkcyBF5RcjM8Eq1uhvn2HDtemhwl5ydvi9dF jdot1V0W8hzmJGQfzKw95yKdzMasNEqAeNnFDQRuboCpKTDylA1QpStfHwipfqPNpLxfzfgvJary/ 2vjBiC5Tl+ZsrZ2O9fMixBsPSubiAyX/1e0RIxOaUyg2HK7QQkXpxzTlkEHbES1yxHhjkQX+QLC/l ZaKVWvr2WzSoR64V+h11rhKf1UiXMi5rvHe6KZJVYR8up7X0LI+CxnvHKGBw00QPYE4s5cJOctNzj kmtLqJ7/gRFaAg==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYsMD-0004A0-EK; Sun, 05 Mar 2023 12:41:26 -0500 From: Janneke Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services Organization: AvatarAcademy.nl References: <20230213164642.24419-1-janneke@gnu.org> <20230216155355.11106-1-janneke@gnu.org> <87v8jgqwg1.fsf_-_@gnu.org> X-Url: http://AvatarAcademy.nl Date: Sun, 05 Mar 2023 18:41:07 +0100 In-Reply-To: <87v8jgqwg1.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Sat, 04 Mar 2023 18:05:02 +0100") Message-ID: <875ybf14gc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: > "Jan (janneke) Nieuwenhuizen" skribis: > >> * gnu/home/services/shepherd-xyz.scm: New file. >> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > > I=E2=80=99d make it version-control.scm instead. Let's do that... > >> +(define-record-type* [..] > I have a prototype here to =E2=80=9Ctransform=E2=80=9D a System service i= nto a Home > service. Would it be of any use here, to share code with > =E2=80=98git-daemon-service-type=E2=80=99? Yes, that would be nice... > Looks like the only issue would be #:user "git-daemon", which is not > going to work, and I don=E2=80=99t have a good solution to that. :-/ ...but indeed. I tried something along those lines. Oh well, I guess I can run my shepherd home git-daemon to system scope and we can ponder on this some more. Come to think of it, are there any plans/ideas to specify home service configurations in the system configuration? Greetings, Janneke --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 05 13:09:44 2023 Received: (at 61483) by debbugs.gnu.org; 5 Mar 2023 18:09:44 +0000 Received: from localhost ([127.0.0.1]:40588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYsnn-00081a-LY for submit@debbugs.gnu.org; Sun, 05 Mar 2023 13:09:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYsnm-00081P-Ay for 61483@debbugs.gnu.org; Sun, 05 Mar 2023 13:09:42 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYsng-0007DZ-4F; Sun, 05 Mar 2023 13:09:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=hzoXTPga0CRcSGEY8WFQg/enmMabPjfjmjq5gTezWJM=; b=n1LdJ8h41VDbZoFNBOr3 bTfVMglbDxsnv5Mt6UWWoJCqv6uuej1MAX1OkyCbPa0OSwDM0S/vj5sK/WGDFpGaENq7DomOaZd0g PdWafdHw8P8mVl6Ey6dfnuDC9J6vAPS0SR4NDTaAx68N56LFa3Z98a3STVVX1bIWpheeSTygw+9eb WgN1GPdEEfPHRxrHAd+AAxi+3r3nXxMD1Lm7Dr+HloeiQuZYIWN24vwJqt4pR3GDYglvSdqlx/K6c MfQk97ZHd7MMZbavNB13XKAaMJ8lUwPakJrdvSpA2GwwHz5mEb+pQMFSl+xRM+61Whex6fDgYYM3q 6WPNF/0Fc3Xrmw==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYsnf-0004Go-Ju; Sun, 05 Mar 2023 13:09:35 -0500 From: Janneke Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services Organization: AvatarAcademy.nl References: <20230216155355.11106-1-janneke@gnu.org> <20230216155355.11106-5-janneke@gnu.org> <87edq4qw0b.fsf_-_@gnu.org> X-Url: http://AvatarAcademy.nl Date: Sun, 05 Mar 2023 19:09:31 +0100 In-Reply-To: <87edq4qw0b.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Sat, 04 Mar 2023 18:14:28 +0100") Message-ID: <871qm31350.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: > "Jan (janneke) Nieuwenhuizen" skribis: > >> * doc/guix.texi (Shepherd Home Services): New subsubsection. > > Oooh, I totally overlooked this. > > Overall I=E2=80=99d suggest documenting in the patch that adds the servic= e. > That way, each change is self-contained, which facilitates review, etc. Sure. > I would suggest creating one section per type, roughly corresponding to > the (gnu home services =E2=80=A6) module: =E2=80=9CMedia=E2=80=9D, =E2=80= =9CVersion Control=E2=80=9D, etc. For > SSH there=E2=80=99s already =E2=80=9CSecure Shell=E2=80=9D. Done. > Also please start each service=E2=80=99s documentation with a couple of > sentences giving context and possibly an example, similar to what=E2=80= =99s done > for the existing Home services. Okay. > Could you send an updated patch series, maybe leaving out git-daemon > until we figure out whether/how to factorize it? Sounds good, coming right up! Thanks, Janneke --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 05 13:11:34 2023 Received: (at 61483) by debbugs.gnu.org; 5 Mar 2023 18:11:34 +0000 Received: from localhost ([127.0.0.1]:40593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYspa-00084V-5M for submit@debbugs.gnu.org; Sun, 05 Mar 2023 13:11:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYspY-00084I-Ey for 61483@debbugs.gnu.org; Sun, 05 Mar 2023 13:11:32 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYspS-0007fG-I1; Sun, 05 Mar 2023 13:11:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=+/ljDPsIGXWP1As+DCMrKvXkkiSIhNm93yF9YSzSLEY=; b=j+VIx7Z/zBGyUS2PutWK BFZd97Tp5fc22yk0eeRsqaMS3WYlcqcUKadc2BhYgZST80m3P7Y8UDmk6WKX8qw5wTLgYOLTsIzz3 MCePs+StEQ+4NMVWhT2I9pbuwaLPsx+zjfTgcSJ8rcIh/4Ticm79iQxWB0eVCJYKeB0/Vdu5LM0s6 SA32TyZxYB6ogbb+HpyjKt8drjfM4hawe/hUI0S+TXWu0ecvGVwrqiwQTnxM7I2NApuwcxiKn4qA5 +M0myET9fSjRrhLiv6cd4MdFvNMgwjsS4VBQkZsj0UbjCSk+V20HR6jkXRDiMQGIjf+JWSf4ABbt7 2/CWWQAu19+OiQ==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYspS-0004Xz-1K; Sun, 05 Mar 2023 13:11:26 -0500 From: Janneke Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services Organization: AvatarAcademy.nl References: <20230216155355.11106-1-janneke@gnu.org> <20230216155355.11106-4-janneke@gnu.org> <87ilfgqw78.fsf_-_@gnu.org> X-Url: http://AvatarAcademy.nl Date: Sun, 05 Mar 2023 19:11:24 +0100 In-Reply-To: <87ilfgqw78.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Sat, 04 Mar 2023 18:10:19 +0100") Message-ID: <87wn3vysoj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: > "Jan (janneke) Nieuwenhuizen" skribis: > >> * gnu/home/services/shepherd-xyz.scm >> (): New type. >> (home-kodi-services): New procedure. >> (home-kodi-service-type): New variable. > > Rather =E2=80=98media.scm=E2=80=99? Check. >> + (description >> + "Install and configure kodi as a shepherd service."))) > > Maybe something like: =E2=80=9CInstall and configure the Kodi media cente= r so > that it runs as a Shepherd service.=E2=80=9D Done. --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 05 13:13:34 2023 Received: (at 61483) by debbugs.gnu.org; 5 Mar 2023 18:13:34 +0000 Received: from localhost ([127.0.0.1]:40600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYsrV-00087M-LR for submit@debbugs.gnu.org; Sun, 05 Mar 2023 13:13:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYsrT-000877-L5 for 61483@debbugs.gnu.org; Sun, 05 Mar 2023 13:13:32 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYsrO-0007s2-F8; Sun, 05 Mar 2023 13:13:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=QgFuK22nxe0D9semoV7HnqrB6QX6TQyRNN/dC4ZUMdc=; b=YhCRzq2IkdH1KJ uAzqBtY6zgK/ojbgd2BMizObBY89kVOY3hkQi3Hzrwr76YhqPMpYAKtKhuMfBlkHb+IACBWsFJUDg YUaCGiOad6uAjh9HRbGaiR9JgZk2NgdoZJ1kfszUIWRWG1Q3j6NGVsDTwVjL8j54+2QnMjSnoRIV2 CHiA5objhY17vBVahUDqI+BWLiZrJOG5FK5yCXpTeGgbNXjeprxmj5FW9Hnfztc7KUBOcAFiigvgI IgUshwsal77AfiEEE100XlKvyN7zv11GW3hvxaPBSDf9hVmCXoxT5VzX/YMMnRYZ8ALTSPy/MaOWh ToS0Q9yEeB3DKbDtY0sg==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1pYsr4-0004sn-9P; Sun, 05 Mar 2023 13:13:25 -0500 From: Janneke Nieuwenhuizen To: 61483@debbugs.gnu.org Subject: [PATCH v3 1/3] gnu: home: services: Add home-ssh-agent-service-type. Date: Sun, 5 Mar 2023 19:13:03 +0100 Message-Id: <20230305181305.30992-1-janneke@gnu.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: Janneke Nieuwenhuizen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) From: "Janneke Nieuwenhuizen" * gnu/home/services/ssh.scm: (): New type. (home-ssh-agent-services): New procedure. (home-ssh-agent-service-type): New variable. * doc/guix.texi (Secure Shell): Document it. --- doc/guix.texi | 56 ++++++++++++++++++++++++++++++++++++++- gnu/home/services/ssh.scm | 54 ++++++++++++++++++++++++++++++++++++- 2 files changed, 108 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 74658dbc86..9cf1451814 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -36,7 +36,7 @@ Copyright @copyright{} 2016, 2017, 2018, 2021 Chris Marusich@* Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner@* Copyright @copyright{} 2016 John Darrington@* Copyright @copyright{} 2016, 2017 Nikita Gillmann@* -Copyright @copyright{} 2016, 2017, 2018, 2019, 2020 Jan Nieuwenhuizen@* +Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2023 Jan Nieuwenhuizen@* Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Julien Lepiller@* Copyright @copyright{} 2016 Alex ter Weele@* Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Christopher Baines@* @@ -42447,6 +42447,60 @@ Extra content appended as-is to this @code{Host} block in @c %end of fragment +@cindex ssh-agent +The @uref{https://www.openssh.com, OpenSSH package} includes a daemon, +the @command{ssh-agent} command, that manages keys to connect to remote +machines using the @acronym{SSH, secure shell} protocol. With the +@code{(gnu home services ssh-agent)} service, you can configure the +OpenSSH ssh-agent to run upon login. + +When using the @code{home-ssh-agent-service-type}, you need to add your +@file{~/.bash_profile}: + +@example +SSH_AUTH_SOCK=$@{XDG_RUNTIME_DIR-$HOME/.cache@}/ssh-agent/socket +export SSH_AUTH_SOCK +@end example + +Of course, you can do that using the @code{home-bash-service-type}, by +adding something like: + +@lisp +(environment-variables + '(("SSH_AUTH_SOCK" + . "$@{SSH_AUTH_SOCK-$@{XDG_RUNTIME_DIR-$HOME/.cache@}/ssh-agent/socket@}"))) +@end lisp + +Here is an example of a service and its configuration that you could add +to the @code{services} field of your @code{home-environment}: + +@lisp +(service home-ssh-agent-service-type + (home-ssh-agent-configuration + (extra-options '("-t" "1h30m")))) +@end lisp + +@defvr {Scheme Variable} home-ssh-agent-service-type +This is the type of the @code{git daemon} home service, whose value is an +@code{home-ssh-agent-configuration} object. +@end defvr + +@deftp {Data Type} home-ssh-agent-configuration +Available @code{home-ssh-agent-configuration} fields are: + +@table @asis +@item @code{git} (default: @code{git}) (type: file-like) +The git package to use. + +@item @code{socket-directory} (default: @code{@env{XDG_RUNTIME_DIR}/ssh-agent"}) (type: string) +The directory to write the ssh-agent's @file{socket} file. + +@item @code{extra-options} (default: @code{'()}) +Extra options will be passed to @command{ssh-agent}, please run +@command{man ssh-agent} for more information. + +@end table +@end deftp @node Desktop Home Services @subsection Desktop Home Services diff --git a/gnu/home/services/ssh.scm b/gnu/home/services/ssh.scm index d15f5ee912..205650d489 100644 --- a/gnu/home/services/ssh.scm +++ b/gnu/home/services/ssh.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2022 Ludovic Courtès +;;; Copyright © 2023 Janneke Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,9 +26,12 @@ (define-module (gnu home services ssh) #:use-module (gnu services configuration) #:use-module (guix modules) #:use-module (gnu home services) + #:use-module (gnu home services shepherd) #:use-module ((gnu home services utils) #:select (object->camel-case-string)) #:autoload (gnu packages base) (glibc-utf8-locales) + #:use-module (gnu packages ssh) + #:use-module (shepherd support) #:use-module (srfi srfi-1) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) @@ -36,6 +40,7 @@ (define-module (gnu home services ssh) home-openssh-configuration-authorized-keys home-openssh-configuration-known-hosts home-openssh-configuration-hosts + home-ssh-agent-configuration openssh-host openssh-host-host-name @@ -52,7 +57,8 @@ (define-module (gnu home services ssh) openssh-host-accepted-key-types openssh-host-extra-content - home-openssh-service-type)) + home-openssh-service-type + home-ssh-agent-service-type)) (define (serialize-field-name name) (match name @@ -254,3 +260,49 @@ (define home-openssh-service-type by providing a @file{~/.ssh/config} file, which is honored by the OpenSSH client,@command{ssh}, and by other tools such as @command{guix deploy}.") (default-value (home-openssh-configuration)))) + + +;;; +;;; Ssh-agent. +;;; +(define-record-type* + home-ssh-agent-configuration make-home-ssh-agent-configuration + home-ssh-agent-configuration? + (openssh home-ssh-agent-openssh ;file-like + (default openssh)) + (socket-directory home-ssh-agent-socket-directory ;string + (default (string-append %user-runtime-dir "/ssh-agent"))) + (extra-options home-ssh-agent-extra-options ;list of string + (default '()))) + +(define (home-ssh-agent-services config) + "Return a for an ssh-agent with CONFIG." + (match config + (($ + openssh socket-directory extra-options) + (let* ((ssh-agent (file-append openssh "/bin/ssh-agent")) + (socket-file (string-append socket-directory "/socket")) + (command `(,ssh-agent + "-D" + "-a" ,socket-file + ,@extra-options)) + (log-file (string-append %user-log-dir "/ssh-agent.log"))) + (list (shepherd-service + (documentation "Run the ssh-agent.") + (provision '(ssh-agent)) + (start #~(lambda _ + (unless (file-exists? #$socket-directory) + (mkdir-p #$socket-directory) + (chmod #$socket-directory #o700)) + (fork+exec-command '#$command #:log-file #$log-file))) + (stop #~(make-kill-destructor)))))))) + +(define home-ssh-agent-service-type + (service-type + (name 'home-ssh-agent) + (default-value (home-ssh-agent-configuration)) + (extensions + (list (service-extension home-shepherd-service-type + home-ssh-agent-services))) + (description + "Install and configure @command{ssh-agent} as a Shepherd service."))) -- 2.39.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 05 13:13:36 2023 Received: (at 61483) by debbugs.gnu.org; 5 Mar 2023 18:13:36 +0000 Received: from localhost ([127.0.0.1]:40604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYsrX-00087e-HD for submit@debbugs.gnu.org; Sun, 05 Mar 2023 13:13:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYsrV-00087B-88 for 61483@debbugs.gnu.org; Sun, 05 Mar 2023 13:13:34 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYsrP-0007sI-UC; Sun, 05 Mar 2023 13:13:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=qhBn9fidyW3PwNrM2A/jsNJf6O3zbm51dGLLK8syvYk=; b=OUr82wFKordDJrpECYLY zAgfnGgUJmbRbmmoOqicfRZFkb92xsLojt+Nz23tAwo4+dpu8zXrfkMQBung5rLz0wOV8mJZG+j2A 7efkw74pMlAvS59vovRo2U5rZUb/3gIxft0x7Ed+ERcUBCR9NajBJtxjFDYugNb1mgbMEoMarK/Mo IilvyuM/e70iyghNaS756nS6EVKbJ48puF91O2GvnIBUdWYY1KsMDJXGV011Xai5DiagUBZl+XUg2 IPqoAW/BtpdjMcP0grzV5FLrXJV3BGW2EAqxfzCkS9Gx59N9NfLmz2MrTHWUhhkGBNxl49ZkSfs35 RTrubueWUePkRQ==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1pYsrO-0004sn-Ku; Sun, 05 Mar 2023 13:13:27 -0500 From: Janneke Nieuwenhuizen To: 61483@debbugs.gnu.org Subject: [PATCH v3 2/3] gnu: home: services: Add home-znc-service-type. Date: Sun, 5 Mar 2023 19:13:04 +0100 Message-Id: <20230305181305.30992-2-janneke@gnu.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230305181305.30992-1-janneke@gnu.org> References: <20230305181305.30992-1-janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: Janneke Nieuwenhuizen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) From: "Janneke Nieuwenhuizen" * gnu/home/services/messaging.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * doc/guix.texi (Messaging Home Services): Document it in new subsection. --- doc/guix.texi | 37 +++++++++++++++++ gnu/home/services/messaging.scm | 72 +++++++++++++++++++++++++++++++++ gnu/local.mk | 3 +- 3 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 gnu/home/services/messaging.scm diff --git a/doc/guix.texi b/doc/guix.texi index 9cf1451814..3ea7f4e470 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41688,6 +41688,7 @@ services)}. * Desktop: Desktop Home Services. Services for graphical environments. * Guix: Guix Home Services. Services for Guix. * Fonts: Fonts Home Services. Services for managing User's fonts. +* Messaging: Messaging Home Services. Services for managing messaging. @end menu @c In addition to that Home Services can provide @@ -42655,6 +42656,42 @@ like this: @end lisp @end defvar +@node Messaging Home Services +@subsection Messaging Home Services + +@cindex znc +The @uref{https://znc.in, ZNC bouncer} can be run as a daemon to manage +your IRC presence. With the @code{(gnu home services znc)} service, you +can configure ZNC to run upon login. + +You will have to provide a @file{~/.znc/configs/znc.conf} seperately. + +Here is an example of a service and its configuration that you could add +to the @code{services} field of your @code{home-environment}: + +@lisp +(service home-znc-service-type) +@end lisp + +@defvr {Scheme Variable} home-znc-service-type +This is the type of the @code{git daemon} home service, whose value is an +@code{home-znc-configuration} object. +@end defvr + +@deftp {Data Type} home-znc-configuration +Available @code{home-znc-configuration} fields are: + +@table @asis +@item @code{git} (default: @code{git}) (type: file-like) +The git package to use. + +@item @code{extra-options} (default: @code{'()}) +Extra options will be passed to @command{znc}, please run @command{man +znc} for more information. + +@end table +@end deftp + @node Invoking guix home @section Invoking @command{guix home} diff --git a/gnu/home/services/messaging.scm b/gnu/home/services/messaging.scm new file mode 100644 index 0000000000..2988b52ad2 --- /dev/null +++ b/gnu/home/services/messaging.scm @@ -0,0 +1,72 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2023 Janneke Nieuwenhuizen +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu home services messaging) + #:use-module (srfi srfi-26) + + #:use-module (ice-9 match) + + #:use-module (shepherd support) + + #:use-module (gnu home services) + #:use-module (gnu home services shepherd) + #:use-module (gnu packages messaging) + #:use-module (gnu services configuration) + #:use-module (gnu services shepherd) + #:use-module (guix records) + #:use-module (guix gexp) + + #:export (home-znc-configuration + home-znc-service-type)) + +;;; +;;; Znc. +;;; +(define-record-type* + home-znc-configuration make-home-znc-configuration + home-znc-configuration? + (znc home-znc-znc ;string + (default znc)) + (extra-options home-znc-extra-options ;list of string + (default '()))) + +(define (home-znc-services config) + "Return a for znc with CONFIG." + (match config + (($ znc extra-options) + (let* ((znc (file-append znc "/bin/znc")) + (command `(,znc + "--foreground" + ,@extra-options)) + (log-file (string-append %user-log-dir "/znc.log"))) + (list (shepherd-service + (documentation "Run the znc IRC bouncer.") + (provision '(znc)) + (start #~(make-forkexec-constructor '#$command + #:log-file #$log-file)) + (stop #~(make-kill-destructor)))))))) + +(define home-znc-service-type + (service-type + (name 'home-znc) + (default-value (home-znc-configuration)) + (extensions + (list (service-extension home-shepherd-service-type + home-znc-services))) + (description + "Install and configure @command{znc} as a Shepherd service."))) diff --git a/gnu/local.mk b/gnu/local.mk index e286e0b076..62461fa26d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -11,7 +11,7 @@ # Copyright © 2016 Ben Woodcroft # Copyright © 2016, 2017, 2018, 2019 Alex Vong # Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner -# Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022 Jan (janneke) Nieuwenhuizen +# Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Jan (janneke) Nieuwenhuizen # Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice # Copyright © 2017, 2018 Clément Lassieur # Copyright © 2017, 2020 Mathieu Othacehe @@ -91,6 +91,7 @@ GNU_SYSTEM_MODULES = \ %D%/home/services/symlink-manager.scm \ %D%/home/services/fontutils.scm \ %D%/home/services/guix.scm \ + %D%/home/services/messaging.scm \ %D%/home/services/pm.scm \ %D%/home/services/shells.scm \ %D%/home/services/shepherd.scm \ -- 2.39.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 05 13:13:36 2023 Received: (at 61483) by debbugs.gnu.org; 5 Mar 2023 18:13:36 +0000 Received: from localhost ([127.0.0.1]:40606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYsrY-00087h-4n for submit@debbugs.gnu.org; Sun, 05 Mar 2023 13:13:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYsrW-00087D-5r for 61483@debbugs.gnu.org; Sun, 05 Mar 2023 13:13:34 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYsrQ-0007sb-Tj; Sun, 05 Mar 2023 13:13:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=nCB7QPyVvAs2HAc0wAcvMm6pH6/5+7kp38zFszCtz4M=; b=nugj0uRyLp2KqASKekjV ibxn9ysiHsziT6bykpAzGXlmeslVZlGKH+OK8VgHgLZlwsokD6Zvi05zLCfjuuCuhjr3oDoZpqjQO Z5wvovybcDm2YGyqv+jg6W2VGF0t1wpmELbeeDwbhDIjw5mB15b5d1jEKyLMUL20sbV7C+qEbznJa LEucL76QCcO0ogmLfjvTxcq1Q6ZoPOaCDhjvVsLUsf9SoD3TvwKJ7h9ocEPtGeiUkbF3eciXW/mtg bM/ofvLq3qiqWvEIyu0QJUxoMIUwqK3e1P6u8uaLiZAYzUQ64oZ0qSLSG0pieJeCM8GHsPItlHqRe VY5bvnpbZkd1gw==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1pYsrQ-0004sn-7V; Sun, 05 Mar 2023 13:13:28 -0500 From: Janneke Nieuwenhuizen To: 61483@debbugs.gnu.org Subject: [PATCH v3 3/3] gnu: home: services: Add home-kodi-service-type. Date: Sun, 5 Mar 2023 19:13:05 +0100 Message-Id: <20230305181305.30992-3-janneke@gnu.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230305181305.30992-1-janneke@gnu.org> References: <20230305181305.30992-1-janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: Janneke Nieuwenhuizen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) From: "Janneke Nieuwenhuizen" * gnu/home/services/media.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * doc/guix.texi (Media Home Services): Document it in new subsection. --- doc/guix.texi | 37 +++++++++++++++++++ gnu/home/services/media.scm | 73 +++++++++++++++++++++++++++++++++++++ gnu/local.mk | 1 + 3 files changed, 111 insertions(+) create mode 100644 gnu/home/services/media.scm diff --git a/doc/guix.texi b/doc/guix.texi index 3ea7f4e470..0578e01f5a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41689,6 +41689,7 @@ services)}. * Guix: Guix Home Services. Services for Guix. * Fonts: Fonts Home Services. Services for managing User's fonts. * Messaging: Messaging Home Services. Services for managing messaging. +* Media: Media Home Services. Services for managing media. @end menu @c In addition to that Home Services can provide @@ -42692,6 +42693,42 @@ znc} for more information. @end table @end deftp +@node Media Home Services +@subsection Media Home Services + +@cindex kodi +The @uref{https://kodi.tv, KODI media center} can be run as a daemon on +a media server. With the @code{(gnu home services kodi)} service, you +can configure KODI to run upon login. + +Here is an example of a service and its configuration that you could add +to the @code{services} field of your @code{home-environment}: + +@lisp +(service home-kodi-service-type + (home-kodi-configuration + (extra-options '("--settings="")))) +@end lisp + +@defvr {Scheme Variable} home-kodi-service-type +This is the type of the @code{git daemon} home service, whose value is an +@code{home-kodi-configuration} object. +@end defvr + +@deftp {Data Type} home-kodi-configuration +Available @code{home-kodi-configuration} fields are: + +@table @asis +@item @code{git} (default: @code{git}) (type: file-like) +The git package to use. + +@item @code{extra-options} (default: @code{'()}) +Extra options will be passed to @command{kodi}, please run @command{man +kodi} for more information. + +@end table +@end deftp + @node Invoking guix home @section Invoking @command{guix home} diff --git a/gnu/home/services/media.scm b/gnu/home/services/media.scm new file mode 100644 index 0000000000..48d7ccf67a --- /dev/null +++ b/gnu/home/services/media.scm @@ -0,0 +1,73 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2023 Janneke Nieuwenhuizen +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu home services media) + #:use-module (srfi srfi-26) + + #:use-module (ice-9 match) + + #:use-module (shepherd support) + + #:use-module (gnu home services) + #:use-module (gnu home services shepherd) + #:use-module (gnu packages kodi) + #:use-module (gnu services configuration) + #:use-module (gnu services shepherd) + #:use-module (guix records) + #:use-module (guix gexp) + + #:export (home-kodi-configuration + home-kodi-service-type)) + +;;; +;;; Kodi. +;;; +(define-record-type* + home-kodi-configuration make-home-kodi-configuration + home-kodi-configuration? + (kodi home-kodi-kodi ;file-like + (default kodi)) + (extra-options home-kodi-extra-options ;list of string + (default '()))) + +(define (home-kodi-services config) + "Return a for kodi with CONFIG." + (match config + (($ kodi extra-options) + (let* ((kodi (file-append kodi "/bin/kodi")) + (command `(kodi + "-fs" + ,@extra-options)) + (log-file (string-append %user-log-dir "/kodi.log"))) + (list (shepherd-service + (documentation "Run the kodi media center.") + (provision '(kodi)) + (start #~(make-forkexec-constructor '#$command + #:log-file #$log-file)) + (stop #~(make-kill-destructor)))))))) + +(define home-kodi-service-type + (service-type + (name 'home-kodi) + (default-value (home-kodi-configuration)) + (extensions + (list (service-extension home-shepherd-service-type + home-kodi-services))) + (description + "Install and configure the Kodi media center so that it runs as a Shepherd +service."))) diff --git a/gnu/local.mk b/gnu/local.mk index 62461fa26d..9b4cfe0a89 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -91,6 +91,7 @@ GNU_SYSTEM_MODULES = \ %D%/home/services/symlink-manager.scm \ %D%/home/services/fontutils.scm \ %D%/home/services/guix.scm \ + %D%/home/services/media.scm \ %D%/home/services/messaging.scm \ %D%/home/services/pm.scm \ %D%/home/services/shells.scm \ -- 2.39.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 05 13:18:59 2023 Received: (at 61483) by debbugs.gnu.org; 5 Mar 2023 18:18:59 +0000 Received: from localhost ([127.0.0.1]:40621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYswk-0008GF-Rh for submit@debbugs.gnu.org; Sun, 05 Mar 2023 13:18:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYswj-0008G0-6H for 61483@debbugs.gnu.org; Sun, 05 Mar 2023 13:18:57 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYswd-00007C-Qo; Sun, 05 Mar 2023 13:18:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=IGu5gFfz8jRwDyiwfsyw6+uRo1KD8w+68fIDKyISkB0=; b=JxbFv8w0Rs1TJNL8+8q1 /9ejLhveEPunizTFbTf0AAiSCSecadOREZyU845zf4VssMlkFCnNxYFKJsJQNjwfyQSr3QGZE+ozD 7rCbNAVEmuyq0GJ2QMzqeBpj2k2Ruto9LlO0sQ4Gv2ns3Fs7IvSVWuGymX+hKAHhfa4AghwZ0JaqO /A/4g9F/Ig4CSxWqk8DFxMMnIpIpfcZAO6YBh/6rEwJen+8TmQV6L/6I8MIFyM5q7pviEZ/WLRQ88 yzBZeunBkXnQXzzw4yxKQCm1BW3uQxQONnbEQmbRGmEujTy2yK5YH4UuMfM20qjuc1TmECSmxSKYP pLWe6mPEXys4/A==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYswd-0005ND-E7; Sun, 05 Mar 2023 13:18:51 -0500 From: Janneke Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services Organization: AvatarAcademy.nl References: <20230213164642.24419-1-janneke@gnu.org> <871qm4sb73.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Sun, 05 Mar 2023 19:18:49 +0100 In-Reply-To: <871qm4sb73.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Sat, 04 Mar 2023 18:01:04 +0100") Message-ID: <87r0u3ysc6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: Hey! > "Jan (janneke) Nieuwenhuizen" skribis: > >> I've been waiting for Guix Home to offer some basic shepherd services fo= r most >> used daemons, replacing the neat shepherd hack described in >> >> https://guix.gnu.org/en/blog/2020/gnu-shepherd-user-services/ >> >> that I've been using, and am a bit puzzled as to why this didn't happen.= Are >> people using Guix Home? > > I am! :-) Oh, good. I'v been tempted for quite a while and will try to switch when this patch series goes in. I'll be moving bits the executable/configuration bits (that are without secrets) from my home.git to guix-home. > Possible reasons not all the services described there made it into Guix > Home: (1) needs vary :-), yeah...could be I'm the only one using kodi and znc, but I expected ssh-agent to be kinda popular... > (2) it=E2=80=99s possible to migrate incrementally, > with some things handled with Home while others are still managed =E2=80= =9Cthe > old way=E2=80=9D (that=E2=80=99s what I do), That sounds like a stategy I'll be following too > and (3) rde is kinda =E2=80=9Ccompeting=E2=80=9D with Home by providing a= whole bunch > of services, giving less of an incentive to migrate them (it=E2=80=99s an > unfortunate issue we identified at the time Home got merged). Ouch, why that's...terrible? Is there any reason stuff is not contributed "up stream"? ;) > But with contributions like these, the situation will improve! Yay! Let's go for that, then. Greetings, Janneke --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 16 07:01:19 2023 Received: (at 61483) by debbugs.gnu.org; 16 Mar 2023 11:01:19 +0000 Received: from localhost ([127.0.0.1]:41324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pclMF-0007hz-1L for submit@debbugs.gnu.org; Thu, 16 Mar 2023 07:01:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pclMD-0007hm-Kb for 61483@debbugs.gnu.org; Thu, 16 Mar 2023 07:01:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pclM7-0006M9-Ih; Thu, 16 Mar 2023 07:01:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=X3gRXM1Yvy/f5xL9kl9Q4zKzJTwJ2jBPMcx3FV5xD/E=; b=M+3BPQZz3BKP73VG2fM2 z/Tv0CBWD9aTkNNl+7JDFr61doRkh4b8PAdubrVEF3fGQWKYUxP/jG39wPtD4yescXTyNOIoK/2a/ KJWd6GvszgK0g2Y4OiJAbICeBml/by8R2vu38dLZFm0QA09O7kHc4j/7rWYcRHkUdAjOVo71T4WoP p590GnnFjbZxuQJTCh3FQJiR8IWVYCqT++JC/6bYoT0NWisrpmhxIWteqwtR5D7ZH1loFbj/gQJg2 yHCf1//F0qToTaZ3KGWqvHlbc5C/XSh5h79o59ExsjN4wZ6y+koM4Ev2Sbx5mNRL9aRsFgthQADzr ZPcRFVtLOJefqQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pclM7-0000ZF-5i; Thu, 16 Mar 2023 07:01:11 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Janneke Nieuwenhuizen Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services References: <20230213164642.24419-1-janneke@gnu.org> <20230305181305.30992-1-janneke@gnu.org> Date: Thu, 16 Mar 2023 12:01:08 +0100 In-Reply-To: <20230305181305.30992-1-janneke@gnu.org> (Janneke Nieuwenhuizen's message of "Sun, 5 Mar 2023 19:13:03 +0100") Message-ID: <87h6ulgdu3.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Janneke Nieuwenhuizen skribis: > From: "Janneke Nieuwenhuizen" > > * gnu/home/services/ssh.scm: (): New type. > (home-ssh-agent-services): New procedure. > (home-ssh-agent-service-type): New variable. > * doc/guix.texi (Secure Shell): Document it. Applied! > +When using the @code{home-ssh-agent-service-type}, you need to add your > +@file{~/.bash_profile}: > + > +@example > +SSH_AUTH_SOCK=3D$@{XDG_RUNTIME_DIR-$HOME/.cache@}/ssh-agent/socket > +export SSH_AUTH_SOCK > +@end example > + > +Of course, you can do that using the @code{home-bash-service-type}, by > +adding something like: > + > +@lisp > +(environment-variables > + '(("SSH_AUTH_SOCK" > + . "$@{SSH_AUTH_SOCK-$@{XDG_RUNTIME_DIR-$HOME/.cache@}/ssh-agent/socket@= }"))) > +@end lisp Maybe we should automate that by having =E2=80=98home-ssh-agent-service-typ= e=E2=80=99 extend =E2=80=98home-environment-variables-service-type=E2=80=99? That way= it=E2=80=99d work out-of-the-box regardless of the shell being used. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 16 07:02:15 2023 Received: (at 61483) by debbugs.gnu.org; 16 Mar 2023 11:02:15 +0000 Received: from localhost ([127.0.0.1]:41336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pclN9-0007jw-7S for submit@debbugs.gnu.org; Thu, 16 Mar 2023 07:02:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pclN7-0007jk-Ia for 61483@debbugs.gnu.org; Thu, 16 Mar 2023 07:02:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pclN1-0006UK-FJ; Thu, 16 Mar 2023 07:02:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=JErQmbnZwMSFT+F1c/Dfy1LxoENnrSWyOQgL1QXr7yk=; b=n+fn5qoaCC51CtdCAm7e Fvs3F5WYPzNXMVE+u1oQh4/Mp2rFI5eacFiT0eMMLIAQ5P0W2UaAoOzVHFdr5h0anLp0anQNXuDcx 3Lhjdq6HahmJwcKG6hoekb3QRnCxy/abQn868Gfc+vJ4U1KJwzB0yeWyuwSiK3Kc4xklowjLlXRGn we7uCcTikYDNonBnrhU2OmF47tsHcm4hyggFw4uqDqOWjhwmYv83SFo/hR/A6fIu2RdQd7UZZeuMl POtOAV8uaeSwfbZTPBW7uCZQFl01ldKoFZCP+b/z8sVp9bHRryxhxiLeOAiJExwghbze9W7JbRkVn foJyl+PWBln9HQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pclMr-0003so-OH; Thu, 16 Mar 2023 07:02:05 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Janneke Nieuwenhuizen Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services References: <20230305181305.30992-1-janneke@gnu.org> <20230305181305.30992-2-janneke@gnu.org> Date: Thu, 16 Mar 2023 12:01:56 +0100 In-Reply-To: <20230305181305.30992-2-janneke@gnu.org> (Janneke Nieuwenhuizen's message of "Sun, 5 Mar 2023 19:13:04 +0100") Message-ID: <87cz59gdsr.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Janneke Nieuwenhuizen skribis: > From: "Janneke Nieuwenhuizen" > > * gnu/home/services/messaging.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > * doc/guix.texi (Messaging Home Services): Document it in new subsection. Applied with the minor changes below. Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/home/services/messaging.scm b/gnu/home/services/messaging.scm index 2988b52ad2..d403b84ac9 100644 --- a/gnu/home/services/messaging.scm +++ b/gnu/home/services/messaging.scm @@ -69,4 +69,5 @@ (define home-znc-service-type (list (service-extension home-shepherd-service-type home-znc-services))) (description - "Install and configure @command{znc} as a Shepherd service."))) + "Install and configure @command{znc}, an @acronym{IRC, Internet Relay +Chat} bouncer, as a Shepherd service."))) diff --git a/po/guix/POTFILES.in b/po/guix/POTFILES.in index 7009fc756c..c71a6ca857 100644 --- a/po/guix/POTFILES.in +++ b/po/guix/POTFILES.in @@ -13,6 +13,7 @@ gnu/services/shepherd.scm gnu/services/samba.scm gnu/services/version-control.scm gnu/home/services.scm +gnu/home/services/messaging.scm gnu/home/services/ssh.scm gnu/home/services/symlink-manager.scm gnu/system/file-systems.scm --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 16 07:04:18 2023 Received: (at 61483) by debbugs.gnu.org; 16 Mar 2023 11:04:18 +0000 Received: from localhost ([127.0.0.1]:41341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pclP7-0007n8-PC for submit@debbugs.gnu.org; Thu, 16 Mar 2023 07:04:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pclP5-0007mu-Kc for 61483@debbugs.gnu.org; Thu, 16 Mar 2023 07:04:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pclP0-000858-CE; Thu, 16 Mar 2023 07:04:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=y0V6xiTj3jEIXQEwRx7yZXAfR/wRrdyjhbo/UYDL51c=; b=qsmgm4vpQ4qKq+Euk7hh 7JN5+8pEvwpuhkSgZg1u052KrSpFT4ZSrxifJGW4AQ/u/Weu7pqhZX/ijQLMHXfAfe9sLBUHNbOka 16Lp3sZ2qAKZJYfAWseF/bt88z3qvByljRlAICrwAknAumzEWJYoiCkqNhFAAYUj4U/Y8XgJlNlhr /8y3wy+eV0OVUlID8VQ0dH9TE5ETedsf59OaI2jrgZVzltHbzJFg6DnpkwBg7tgEItofTxoeDmfO+ nXEIMtAqKE7/erlxfInIYaxtOhuHUfYulMcT4/dn/kygab7lNDVShW4KIKwLGxtfE54hV4tTTVUXb 9SFGG2n7AgIPJg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pclOz-00029J-Fe; Thu, 16 Mar 2023 07:04:10 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Janneke Nieuwenhuizen Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services References: <20230305181305.30992-1-janneke@gnu.org> <20230305181305.30992-3-janneke@gnu.org> Date: Thu, 16 Mar 2023 12:04:07 +0100 In-Reply-To: <20230305181305.30992-3-janneke@gnu.org> (Janneke Nieuwenhuizen's message of "Sun, 5 Mar 2023 19:13:05 +0100") Message-ID: <878rfxgdp4.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Janneke Nieuwenhuizen skribis: > From: "Janneke Nieuwenhuizen" > > * gnu/home/services/media.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > * doc/guix.texi (Media Home Services): Document it in new subsection. Please also add the new file to =E2=80=98po/guix/POTFILES.in=E2=80=99 so de= scriptions can be translated. Otherwise LGTM! In the meantime I realized I don=E2=80=99t have to push it on your behalf, = so I=E2=80=99ll let you take care of it=E2=80=94sorry for the confusion! Thank you, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 16 10:06:58 2023 Received: (at 61483) by debbugs.gnu.org; 16 Mar 2023 14:06:58 +0000 Received: from localhost ([127.0.0.1]:42678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcoFt-00016l-Lh for submit@debbugs.gnu.org; Thu, 16 Mar 2023 10:06:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcoFr-00016S-Ln for 61483@debbugs.gnu.org; Thu, 16 Mar 2023 10:06:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcoFm-0005he-DD; Thu, 16 Mar 2023 10:06:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=47fKZ9Mxa48Cr0IfqlL5L2nMvm0z3rRBbUIOQ7p/Hfg=; b=EoNWJGYsWfwNdbUHDTT3 sxP21pITUxirvw6ILaM/wMWtMmsElb70CK7sSVD21IuZBriiwiegVsM/8rPM03OZ1flkuJeVGDZqh 1blmJEzwoAHg+2td4k9C+o5Yf31P5Ar7IJqXswGKvPfsf3LgyFwt/ZMSeU/xqr/YofwKwbGO6ZOpn fkXruBEwA7TC6tGVG1JdaU0+ly6D9rc7w4wdr+FNZOwfTCM65ycngTDBFS3VJY49KnhKtjERsQxnZ ZyVH7MhF6nBg9TrXnVw2+Px4e/SL132rsvPaqx9dDIq0JKS5C1+W295cI9yOQCEzmBPGoMTZGJdVG WQgPxGXHmtgdsg==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcoFl-00004q-P5; Thu, 16 Mar 2023 10:06:50 -0400 From: Janneke Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services Organization: AvatarAcademy.nl References: <20230305181305.30992-1-janneke@gnu.org> <20230305181305.30992-2-janneke@gnu.org> <87cz59gdsr.fsf_-_@gnu.org> X-Url: http://AvatarAcademy.nl Date: Thu, 16 Mar 2023 15:06:43 +0100 In-Reply-To: <87cz59gdsr.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Thu, 16 Mar 2023 12:01:56 +0100") Message-ID: <87zg8cokng.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: > Janneke Nieuwenhuizen skribis: > >> From: "Janneke Nieuwenhuizen" >> >> * gnu/home/services/messaging.scm: New file. >> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. >> * doc/guix.texi (Messaging Home Services): Document it in new subsection. > > Applied with the minor changes below. Thanks for the changes, applied them too :-) --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 16 10:07:18 2023 Received: (at 61483) by debbugs.gnu.org; 16 Mar 2023 14:07:18 +0000 Received: from localhost ([127.0.0.1]:42685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcoGE-00017x-18 for submit@debbugs.gnu.org; Thu, 16 Mar 2023 10:07:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcoGB-00017e-Qj for 61483@debbugs.gnu.org; Thu, 16 Mar 2023 10:07:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcoG6-0005kN-Kt; Thu, 16 Mar 2023 10:07:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=5g2lZzZ5OCTo/vRPebeseI2oN8fbIZ9GDIPtqSGi/7A=; b=cc5YI6emYABCI49SLlQZ rP4b8EAS2dm5dft9x1Ij2ZTKWfp0dktSbL7dbCIlyiqCcgepEZGdhks3S+c/LFPSK9HsSC9457HZA HSuVnckbxH0oOpDrKjp0hdn5qCCWfORY+T4CeaU2eQPt5gvz/4BwigIGtM+VNNalFnpeV7xInS7L0 r/HmqayfMA8BWPDP2IibuOh5BLVSKAKU723csC7Rxb8ke6uYdz5rJ2V+QM5yvMjjp3WkaRne0LjQS 4igKA818MPliwqtFi8PxBe6Z2W1/wclmK//0fUXMeuzl2glR5/nkAsrxZULjFcA4eFBkOsEhpzVsK V4Pc+1P0VlSJgA==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcoG5-00008R-VQ; Thu, 16 Mar 2023 10:07:10 -0400 From: Jan Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services Organization: AvatarAcademy.nl References: <20230305181305.30992-1-janneke@gnu.org> <20230305181305.30992-3-janneke@gnu.org> <878rfxgdp4.fsf_-_@gnu.org> X-Url: http://AvatarAcademy.nl Date: Thu, 16 Mar 2023 15:07:08 +0100 In-Reply-To: <878rfxgdp4.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Thu, 16 Mar 2023 12:04:07 +0100") Message-ID: <87y1nwokmr.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: > Janneke Nieuwenhuizen skribis: > >> From: "Janneke Nieuwenhuizen" >> >> * gnu/home/services/media.scm: New file. >> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. >> * doc/guix.texi (Media Home Services): Document it in new subsection. > > Please also add the new file to =E2=80=98po/guix/POTFILES.in=E2=80=99 so = descriptions > can be translated. Otherwise LGTM! Great, done. > In the meantime I realized I don=E2=80=99t have to push it on your behalf= , so > I=E2=80=99ll let you take care of it=E2=80=94sorry for the confusion! Thanks, pushed to master as 70056b1b2beebbc9f8ea2c34eacc57f379368ab3 Greetings, Janneke --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 16 10:08:58 2023 Received: (at 61483) by debbugs.gnu.org; 16 Mar 2023 14:08:58 +0000 Received: from localhost ([127.0.0.1]:42698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcoHq-0001BE-9Z for submit@debbugs.gnu.org; Thu, 16 Mar 2023 10:08:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcoHp-0001Az-0m for 61483@debbugs.gnu.org; Thu, 16 Mar 2023 10:08:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcoHj-0006A7-FF; Thu, 16 Mar 2023 10:08:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=WzKe6ViSQKfKfkyicqgB3d/6W+FklqYME0he+VIDgaI=; b=AawIlDErfIXWfEPHbNqn ZX+ygWh8WI/vpt0LAl+187ThCgcTPOkvbZu9wBR4dyC0kh7Xxmi7FXcNNryBYP3yCNPH+XPSIa/1P +oEZKRYasdBXNOCdOgoAisrvDJN5uW39LBjlTp0d2Qs9qcpc+r1YqTWjixMZMIgxC5+wGRotdURhd 4fbfr1SDx2pT6gKBEK17RuxHGQWTK48rbKL1AQP8tbyeDdhpv00zUGyDLaTaMYsgu2cBgLFUkqltX KyVRroS4SZapFXbaTqhFdpvJzlUxGopEfG6+Z+j7/jpjFxR5Kr0w6mdCOkoe7Na/K1PD1oueg9qz/ lQHfRg5u3z6uSg==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcoHj-0000Jc-1q; Thu, 16 Mar 2023 10:08:51 -0400 From: Janneke Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services Organization: AvatarAcademy.nl References: <20230213164642.24419-1-janneke@gnu.org> <20230305181305.30992-1-janneke@gnu.org> <87h6ulgdu3.fsf_-_@gnu.org> X-Url: http://AvatarAcademy.nl Date: Thu, 16 Mar 2023 15:08:49 +0100 In-Reply-To: <87h6ulgdu3.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Thu, 16 Mar 2023 12:01:08 +0100") Message-ID: <87ttykokjy.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: Hi, > Janneke Nieuwenhuizen skribis: > >> +@lisp >> +(environment-variables >> + '(("SSH_AUTH_SOCK" >> + . "$@{SSH_AUTH_SOCK-$@{XDG_RUNTIME_DIR-$HOME/.cache@}/ssh-agent/socket= @}"))) >> +@end lisp > > Maybe we should automate that by having =E2=80=98home-ssh-agent-service-t= ype=E2=80=99 > extend =E2=80=98home-environment-variables-service-type=E2=80=99? That w= ay it=E2=80=99d work > out-of-the-box regardless of the shell being used. Oh that's a neat idea! Someone will have to figure out how to do that, later. Greetings, Janneke --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 16 11:21:47 2023 Received: (at 61483) by debbugs.gnu.org; 16 Mar 2023 15:21:47 +0000 Received: from localhost ([127.0.0.1]:42774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcpQJ-0002zq-7I for submit@debbugs.gnu.org; Thu, 16 Mar 2023 11:21:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcpQI-0002zc-1w for 61483@debbugs.gnu.org; Thu, 16 Mar 2023 11:21:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcpQB-0005Lj-I8; Thu, 16 Mar 2023 11:21:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=GGJcbFJBXMzdVWYUkxwfZyrP4YqNVhWUD12+LkSSy5Q=; b=VasrJexCzbTjWd2Ac8eC umCpVHr94Pn3U8xOxkfuXkPloO89Vw3ACvOQstLI3loGCMYdhwi0+ohmNPvWmqCV5pdEjBbmWkDPi drBYje2H3S7vxD0LUgWpXkzgmyyWEr80h4o4kk2S/b8qi1yG1pmZsHKFwZiyrIYhL9euYPIGcKWTc eHLDf8YMfe08xv6d3EzKOQOf0Clvl1oONpQSzCTSX62aG+bbi6OjXqz8vp7bZkQOPxW7bf8k1y7ob +T0EL3p1Ic6nt95HDFoV4+/o5XwJcgfj/uMNa6frXca74pnOzwB37ItJv2yhajFk1aGm2FDIfqHoo EcijwnpM/pvl2A==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcpQ3-0001mK-Q9; Thu, 16 Mar 2023 11:21:39 -0400 From: Jannneke Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services Organization: AvatarAcademy.nl References: <20230305181305.30992-1-janneke@gnu.org> <20230305181305.30992-3-janneke@gnu.org> <878rfxgdp4.fsf_-_@gnu.org> <87y1nwokmr.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Thu, 16 Mar 2023 16:21:27 +0100 In-Reply-To: <87y1nwokmr.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Thu, 16 Mar 2023 15:07:08 +0100") Message-ID: <87pm98oh6w.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jan Nieuwenhuizen writes: > Ludovic Court=C3=A8s writes: > >> Janneke Nieuwenhuizen skribis: >> >>> From: "Janneke Nieuwenhuizen" >>> >>> * gnu/home/services/media.scm: New file. >>> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. >>> * doc/guix.texi (Media Home Services): Document it in new subsection. >> >> Please also add the new file to =E2=80=98po/guix/POTFILES.in=E2=80=99 so= descriptions >> can be translated. Otherwise LGTM! > > Great, done. > >> In the meantime I realized I don=E2=80=99t have to push it on your behal= f, so >> I=E2=80=99ll let you take care of it=E2=80=94sorry for the confusion! > > Thanks, pushed to master as > > 70056b1b2beebbc9f8ea2c34eacc57f379368ab3 Well, it seems I added a dependency to the shepherd, module (shepherd support), for things like %user-runtime-dir I locally applied the attached patch to add Shepherd as an input (not sure if that would be OK), but now `make update-guix-package' fails: --8<---------------cut here---------------start------------->8--- $ make update-guix-package git rev-parse HEAD bd086f1718123a4d180aa6f2178828a83025ab35 ./pre-inst-env "/gnu/store/f4w31qrim35yfnppacfmig491x1nwi3x-profile/bin/gui= le" \ ./build-aux/update-guix-package.scm \ "`git rev-parse HEAD`" error: Failed to find the origin git remote. make: *** [Makefile:7178: update-guix-package] Error 1 --8<---------------cut here---------------end--------------->8--- Not sure what to do, possibly best to revert the home services patches again until we have (consensus on a) fix. Greetings, Janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-guix-Add-shepherd-as-input-dependency.patch Content-Transfer-Encoding: quoted-printable >From bd086f1718123a4d180aa6f2178828a83025ab35 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Thu, 16 Mar 2023 16:08:01 +0100 Subject: [PATCH] gnu: guix: Add shepherd as input dependency. The home services depend on (shepherd support). * gnu/packages/package-management.scm (guix)[inputs]: Add shepherd-0.9. --- gnu/packages/package-management.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-man= agement.scm index d27c8a91ef..8a05955d1a 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -12,7 +12,7 @@ ;;; Copyright =C2=A9 2019-2023 Efraim Flashner ;;; Copyright =C2=A9 2019 Jonathan Brielmaier ;;; Copyright =C2=A9 2020 Mathieu Othacehe -;;; Copyright =C2=A9 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright =C2=A9 2020, 2023 Jan (janneke) Nieuwenhuizen ;;; Copyright =C2=A9 2020 Giacomo Leidi ;;; Copyright =C2=A9 2020 Jesse Gibbons ;;; Copyright =C2=A9 2020 Martin Becze @@ -41,6 +41,7 @@ (define-module (gnu packages package-management) #:use-module (gnu artwork) #:use-module (gnu packages) #:use-module (gnu packages acl) + #:use-module (gnu packages admin) #:use-module (gnu packages attr) #:use-module (gnu packages avahi) #:use-module (gnu packages autotools) @@ -462,7 +463,8 @@ (define code ("disarchive" ,disarchive) ;for 'guix perform-downl= oad' ("guile-lzma" ,guile-lzma) ;for Disarchive =20 - ("glibc-utf8-locales" ,glibc-utf8-locales))) + ("glibc-utf8-locales" ,glibc-utf8-locales) + ("shepherd" ,shepherd-0.9))) (propagated-inputs `(("guile-gnutls" ,guile-gnutls) ;; Avahi requires "glib" which doesn't cross-compile yet. --=20 2.39.1 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 16 12:16:17 2023 Received: (at 61483) by debbugs.gnu.org; 16 Mar 2023 16:16:17 +0000 Received: from localhost ([127.0.0.1]:42793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcqH2-0004v5-OW for submit@debbugs.gnu.org; Thu, 16 Mar 2023 12:16:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcqH0-0004uq-1z for 61483@debbugs.gnu.org; Thu, 16 Mar 2023 12:16:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcqGu-0005Sj-8c; Thu, 16 Mar 2023 12:16:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=jOI1jLKB86Jt1DZkWMgPQqgqa8Isp1w3aASWhKUueUE=; b=Mi6/pJ/KGhDtAJqUJM5q ow5bG7qZ/3XaFeez9KORBMFjVXXVuxJJ/rSUeSNiv61B7hdfdx3NBRWGcGrAVZTrHdyXU88f9fRS+ Cxxzg+Wr92bEoWk8RRAeOVjwC6MvS2S3HS5nuCrJS87H49eY2v/li2xj4/TT3hep9C/YAXPpJxomo IKrug9S5ftwGckv6fXC7UTJRPd0iCDZgVTdWhrDChsBeDY+dZ60AuSlVjYrmFHG9ACuFv7CEmOeax y57rDS3QSKX8Klu3eIw3AdWEVKMZQTz9ZvmnXnw8tW4UBjlqTFqp9jRFa9vcuZTrHvx1Cy6gevcba HsKLrPa+sMolow==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcqGt-0005Rb-Qu; Thu, 16 Mar 2023 12:16:08 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Jannneke Nieuwenhuizen Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services References: <20230305181305.30992-1-janneke@gnu.org> <20230305181305.30992-3-janneke@gnu.org> <878rfxgdp4.fsf_-_@gnu.org> <87y1nwokmr.fsf@gnu.org> <87pm98oh6w.fsf@gnu.org> Date: Thu, 16 Mar 2023 17:16:05 +0100 In-Reply-To: <87pm98oh6w.fsf@gnu.org> (Jannneke Nieuwenhuizen's message of "Thu, 16 Mar 2023 16:21:27 +0100") Message-ID: <875yb0d64a.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi again, Jannneke Nieuwenhuizen skribis: >>> In the meantime I realized I don=E2=80=99t have to push it on your beha= lf, so >>> I=E2=80=99ll let you take care of it=E2=80=94sorry for the confusion! >> >> Thanks, pushed to master as >> >> 70056b1b2beebbc9f8ea2c34eacc57f379368ab3 > > Well, it seems I added a dependency to the shepherd, module (shepherd > support), for things like > > %user-runtime-dir I pushed a fix as be7e2bf7ebc10bb4e5808ddeabc4b914f575865f, tested with =E2=80=98guix home container=E2=80=99. > I locally applied the attached patch to add Shepherd as an input (not > sure if that would be OK), but now `make update-guix-package' fails: Guix in general on the =E2=80=9Chost side=E2=80=9D should not depend on the= Shepherd, there=E2=80=99s no reason to do so. The solution for Home or System services is to depend on the Shepherd but only in the run-time code stage. This is what I did in be7e2bf7ebc10bb4e5808ddeabc4b914f575865f: code that needs to refer to =E2=80=98%user-runtime-dir=E2=80=99 is staged such that it will look up tha= t variable at run time, when the user =E2=80=98shepherd=E2=80=99 process is started. That=E2=80=99s really what we want here, because it also ensures that the c= ode sees the right value for =E2=80=98%user-runtime-dir=E2=80=99 (otherwise it = would see the configuration-time value, which could be different). Apologies for overlooking that! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 17 07:53:50 2023 Received: (at 61483-done) by debbugs.gnu.org; 17 Mar 2023 11:53:50 +0000 Received: from localhost ([127.0.0.1]:43856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pd8eb-0007J7-Hw for submit@debbugs.gnu.org; Fri, 17 Mar 2023 07:53:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pd8ea-0007Iv-9x for 61483-done@debbugs.gnu.org; Fri, 17 Mar 2023 07:53:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pd8eS-00081r-KB; Fri, 17 Mar 2023 07:53:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=vt3Nxt+hCW2h8a7skd+WPH7PQ2zo6DrEqdibeV9a0VQ=; b=i9iNFvsslvyZWGtq0tm1 GVmD0RZ9bG6NEFu4jXgdNNQIkcIt4ULxeK4/8zV4trqSFVyenqOkc0KpyM8zKFqmoBRIYpKLDsetm uE9SUYcViAasO6hh628z3eMtJPGHFXhT7YPtXauGTdsAFxK1DmjsoHjex17PnY8afGg/3rQL679QV uMrZNKTByDAs8DLyfXf40El0jO9vIEBmYX/+vdBKLaNSKdQVcGkjLaV+3r1IAxe4Tb+eqyg791fJY nnlZJeG4WzfOO9PsxuuMoSDPiInXZRk/HF1hMMZsVZBLT0pJHy31PVWf2kNjXifB2JQ1ZQUuNRFS1 slHIz5AEXBrKww==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pd8eS-00079k-5U; Fri, 17 Mar 2023 07:53:40 -0400 From: Janneke Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services Organization: AvatarAcademy.nl References: <20230213164642.24419-1-janneke@gnu.org> <20230305181305.30992-1-janneke@gnu.org> <87h6ulgdu3.fsf_-_@gnu.org> <87ttykokjy.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Fri, 17 Mar 2023 12:53:35 +0100 In-Reply-To: <87ttykokjy.fsf@gnu.org> (Janneke Nieuwenhuizen's message of "Thu, 16 Mar 2023 15:08:49 +0100") Message-ID: <87h6ujoaps.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483-done Cc: 61483-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Janneke Nieuwenhuizen writes: Hi! > Ludovic Court=C3=A8s writes: > > Hi, > >> Janneke Nieuwenhuizen skribis: >> >>> +@lisp >>> +(environment-variables >>> + '(("SSH_AUTH_SOCK" >>> + . "$@{SSH_AUTH_SOCK-$@{XDG_RUNTIME_DIR-$HOME/.cache@}/ssh-agent/socke= t@}"))) >>> +@end lisp >> >> Maybe we should automate that by having =E2=80=98home-ssh-agent-service-= type=E2=80=99 >> extend =E2=80=98home-environment-variables-service-type=E2=80=99? That = way it=E2=80=99d work >> out-of-the-box regardless of the shell being used. > > Oh that's a neat idea! Someone will have to figure out how to do that, > later. I've pushed the attached patch to take care of this. Pretty neat! Closing this bug now, if we want to address the git-daemon "transform" and #:user "git-daemon" issue better to open a new bug report. Greetings, Janneke --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-home-services-ssh-agent-Handle-setting-of-SSH_AUTH_S.patch >From 2714c9ef2d6cb42f15c2f284449f602467f0d1c0 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Fri, 17 Mar 2023 12:40:16 +0100 Subject: [PATCH] home: services: ssh-agent: Handle setting of SSH_AUTH_SOCK. * gnu/home/services/ssh.scm (home-ssh-agent-environment-variables): New procedure. (home-ssh-agent-service-type): Use it as ahome-environment-service type extension. * doc/guix.texi (Secure Shell): Remove advice about, and examples of setting SSH_AUTH_SOCK. --- doc/guix.texi | 17 ----------------- gnu/home/services/ssh.scm | 8 +++++++- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 4807f16c0a..2d42ca8de2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -42473,23 +42473,6 @@ machines using the @acronym{SSH, secure shell} protocol. With the @code{(gnu home services ssh-agent)} service, you can configure the OpenSSH ssh-agent to run upon login. -When using the @code{home-ssh-agent-service-type}, you need to add your -@file{~/.bash_profile}: - -@example -SSH_AUTH_SOCK=$@{XDG_RUNTIME_DIR-$HOME/.cache@}/ssh-agent/socket -export SSH_AUTH_SOCK -@end example - -Of course, you can do that using the @code{home-bash-service-type}, by -adding something like: - -@lisp -(environment-variables - '(("SSH_AUTH_SOCK" - . "$@{SSH_AUTH_SOCK-$@{XDG_RUNTIME_DIR-$HOME/.cache@}/ssh-agent/socket@}"))) -@end lisp - Here is an example of a service and its configuration that you could add to the @code{services} field of your @code{home-environment}: diff --git a/gnu/home/services/ssh.scm b/gnu/home/services/ssh.scm index dc37ecf329..01917a29cd 100644 --- a/gnu/home/services/ssh.scm +++ b/gnu/home/services/ssh.scm @@ -295,12 +295,18 @@ (define (home-ssh-agent-services config) (fork+exec-command #$command #:log-file #$log-file))) (stop #~(make-kill-destructor))))))) +(define (home-ssh-agent-environment-variables config) + '(("SSH_AUTH_SOCK" + . "${SSH_AUTH_SOCK-${XDG_RUNTIME_DIR-$HOME/.cache}/ssh-agent/socket}"))) + (define home-ssh-agent-service-type (service-type (name 'home-ssh-agent) (default-value (home-ssh-agent-configuration)) (extensions (list (service-extension home-shepherd-service-type - home-ssh-agent-services))) + home-ssh-agent-services) + (service-extension home-environment-variables-service-type + home-ssh-agent-environment-variables))) (description "Install and configure @command{ssh-agent} as a Shepherd service."))) -- 2.39.1 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 17 07:57:39 2023 Received: (at 61483) by debbugs.gnu.org; 17 Mar 2023 11:57:39 +0000 Received: from localhost ([127.0.0.1]:43867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pd8iJ-0007P8-Aa for submit@debbugs.gnu.org; Fri, 17 Mar 2023 07:57:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pd8iG-0007Ou-QA for 61483@debbugs.gnu.org; Fri, 17 Mar 2023 07:57:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pd8iB-0002Yv-FO; Fri, 17 Mar 2023 07:57:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=C/2tlRYt3MNbp8niMZIj7bHSH1TdYyb71r1qkGGue6I=; b=AN/aVzQwvS4uEKgjCRTa pomZEJiAzELRLzvOSDLYa9g3Czuq+HMf1ZPNJhmc/AQpoOFdg1St4FS2S1x8NXzuGBIxGiLJ7jhpb YNu+hy6aCEIgN7wvJJ062E67+aBcIEKA1t+TNiAGzKBUi3aRnmayD1aIyRi1GiEcLot2kWYahrBco WtOvsA0n2bVAp4yl1PpETjNETHque7SC+6vNDsUzx7uol3eZ5NiqMnenqpa/ykPWeSUE/ztbIoqgv eQi2HQr+2IbmAxh7sybnqH2jGjoBlZ2w364sLVo1H/ESaAu9/HdPUF4DRQdsTxnC6UYOLfe09n4NF IL1VScoAcOAo7Q==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pd8i3-0007i4-BG; Fri, 17 Mar 2023 07:57:30 -0400 From: Janneke Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services Organization: AvatarAcademy.nl References: <20230305181305.30992-1-janneke@gnu.org> <20230305181305.30992-3-janneke@gnu.org> <878rfxgdp4.fsf_-_@gnu.org> <87y1nwokmr.fsf@gnu.org> <87pm98oh6w.fsf@gnu.org> <875yb0d64a.fsf_-_@gnu.org> X-Url: http://AvatarAcademy.nl Date: Fri, 17 Mar 2023 12:57:20 +0100 In-Reply-To: <875yb0d64a.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Thu, 16 Mar 2023 17:16:05 +0100") Message-ID: <87cz57oajj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483 Cc: 61483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: Hello,=20 > Jannneke Nieuwenhuizen skribis: > [..] >> Well, it seems I added a dependency to the shepherd, module (shepherd >> support), for things like >> >> %user-runtime-dir > > I pushed a fix as be7e2bf7ebc10bb4e5808ddeabc4b914f575865f, tested with > =E2=80=98guix home container=E2=80=99. Thank you! >> I locally applied the attached patch to add Shepherd as an input (not >> sure if that would be OK), but now `make update-guix-package' fails: > > Guix in general on the =E2=80=9Chost side=E2=80=9D should not depend on t= he Shepherd, > there=E2=80=99s no reason to do so. > > The solution for Home or System services is to depend on the Shepherd > but only in the run-time code stage. This is what I did in > be7e2bf7ebc10bb4e5808ddeabc4b914f575865f: code that needs to refer to > =E2=80=98%user-runtime-dir=E2=80=99 is staged such that it will look up t= hat variable at > run time, when the user =E2=80=98shepherd=E2=80=99 process is started. Oh, that's so nice! > That=E2=80=99s really what we want here, because it also ensures that the= code > sees the right value for =E2=80=98%user-runtime-dir=E2=80=99 (otherwise i= t would see the > configuration-time value, which could be different). > > Apologies for overlooking that! Well, I also failed to see that I pulled in the Shepherd as a dependency until sarg "complained" about a missing file on IRC. Simply copied this from my direct Shepherd solution, ugh. Sorry! Greetings, Janneke --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 17 17:07:17 2023 Received: (at 61483-done) by debbugs.gnu.org; 17 Mar 2023 21:07:17 +0000 Received: from localhost ([127.0.0.1]:45765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdHID-0006n9-6a for submit@debbugs.gnu.org; Fri, 17 Mar 2023 17:07:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdHIB-0006mv-Ru for 61483-done@debbugs.gnu.org; Fri, 17 Mar 2023 17:07:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdHI6-0001Jl-J3; Fri, 17 Mar 2023 17:07:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Pl8mZTWAIo003CjkE4zO1Fp5fbGSD41ayCEygJTyvp0=; b=LOBjhl1vAUjnatslKZ+V b+39Yqw8u0D0xlEny2eRYscgBvq2juvk8iKjN5NV7OvCmPbvIt31/LwBbB2xko2iBJZacQX07lQe7 EM5f38L8JPLBdXeMlnZII0u5JQVzlW03BTfPIngAh3UEChJCcUQn/823HGvkVKoBb1yf6hRDZM5SH zLx/aIBOJSaJo4yc8whkYaCulKNo4iE3+uwvW/6b8WJNxbt2dj+fQNBgtXB3/2EVDwP7UeR8CS9Ou HK9ytc8g4BjosKUBdP5OItV2xtZ7txRVqbuUJJjySXIm93fbG9yQpslHrEKrU2AXkT4fbByeWZ3fx uW+8tAtv3CHDKg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdHI6-0007xv-6V; Fri, 17 Mar 2023 17:07:10 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Janneke Nieuwenhuizen Subject: Re: bug#61483: [PATCH 0/5] Some basic Home Shepherd Services References: <20230213164642.24419-1-janneke@gnu.org> <20230305181305.30992-1-janneke@gnu.org> <87h6ulgdu3.fsf_-_@gnu.org> <87ttykokjy.fsf@gnu.org> <87h6ujoaps.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Septidi 27 =?utf-8?Q?Vent=C3=B4se?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour de la Sylvie X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 17 Mar 2023 22:07:07 +0100 In-Reply-To: <87h6ujoaps.fsf@gnu.org> (Janneke Nieuwenhuizen's message of "Fri, 17 Mar 2023 12:53:35 +0100") Message-ID: <873563xf2c.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61483-done Cc: 61483-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Howdy, Janneke Nieuwenhuizen skribis: > From 2714c9ef2d6cb42f15c2f284449f602467f0d1c0 Mon Sep 17 00:00:00 2001 > From: "Jan (janneke) Nieuwenhuizen" > Date: Fri, 17 Mar 2023 12:40:16 +0100 > Subject: [PATCH] home: services: ssh-agent: Handle setting of SSH_AUTH_SO= CK. > > * gnu/home/services/ssh.scm (home-ssh-agent-environment-variables): New > procedure. > (home-ssh-agent-service-type): Use it as ahome-environment-service type > extension. > * doc/guix.texi (Secure Shell): Remove advice about, and examples of sett= ing > SSH_AUTH_SOCK. Excellent, thanks! Ludo=E2=80=99. From unknown Tue Sep 23 05:03:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 15 Apr 2023 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator