From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SEQ6Attq6mNrEgEAbAwnHQ (envelope-from ) for ; Mon, 13 Feb 2023 17:52:43 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id yJf4Adtq6mPWMQAAauVa8A (envelope-from ) for ; Mon, 13 Feb 2023 17:52:43 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CFF2D996E for ; Mon, 13 Feb 2023 17:52:42 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=WqUWRL2P; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676307162; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=dk2OCnQO0+Qo/X1UQcVxO6+sbWmKh8Uo5Oq08Om6Szo=; b=HAmYot83ZOE8fQw72JR3fhwikVBvz8q2UlOhAK3cgRXyQA6eeGeRzsEFcWmiE7334QPz/n /Wf0SRbBTenzxIrglSp0eGf6bLhEn1NY7W+tHQ3HBEsnVy8Jofb0014OHzH8jxOwE/is0P dlZBY9D6wKTDaajdtqRGMRTD+jx13C8eaOap4V7LXg3Kim7RT9iWOGe4epndu1PE6NIDHP F2EypprHzL7G20TNha5wznANMMKRzU+HfZ85YQ0BJlbvC6gQEkCGTUWH2SoJD+8pnzdWBV e0ipAwObZci30KCrU7+lclmaQvutS4/kFgmKC26BE/PpTIS+YQa6iMU7oKoiSA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=WqUWRL2P; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676307162; a=rsa-sha256; cv=none; b=fDxY75eX1ZXwidy7GaqI5Faj8v/JAaHBECltv8xDsdKUC4mv7gwpir511Q9bw0Hbgo6/0L EU2RUcf86CQmS4DTxeaAKv01vBvtA5B61VupUAz/oFABMQT+XBqhfjaBgiMrJby/5CYD7Z LE0AnRpC2yUSQ7/l+FFxClL0oeYctDT9Xw6nN5k4VU0WtGgEL9ogGjUGG3yh+CloZWgWu7 MbOZ6Wq7j4jzeq4Q8EUCgEsw+bra0nsjEyZgtex+RFeyTLAqBJums51fqJfH6jLf2Y/pGv AUSqaIzpt+E6JyP9unVoHd+uCu3oopJFRePgd6E/+9EjpqkDo8PCa7ftUc3Kgg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRc3n-0008AA-1z; Mon, 13 Feb 2023 11:52:11 -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 1pRc3e-00088O-UR for guix-patches@gnu.org; Mon, 13 Feb 2023 11:52:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRc3e-0005a4-LR for guix-patches@gnu.org; Mon, 13 Feb 2023 11:52:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pRc3e-0003y8-Hn for guix-patches@gnu.org; Mon, 13 Feb 2023 11:52:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61483] [PATCH 4/5] DRAFT gnu: home: services: Add home-kodi-service-type. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Feb 2023 16:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61483 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61483@debbugs.gnu.org Cc: Janneke Nieuwenhuizen Received: via spool by 61483-submit@debbugs.gnu.org id=B61483.167630707515171 (code B ref 61483); Mon, 13 Feb 2023 16:52:02 +0000 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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: X-Migadu-Queue-Id: CFF2D996E X-Spam-Score: -3.42 X-Migadu-Spam-Score: -3.42 X-Migadu-Scanner: scn0.migadu.com List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: KnYr7yVjnhVd 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