From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 08 18:24:36 2024 Received: (at submit) by debbugs.gnu.org; 8 Aug 2024 22:24:36 +0000 Received: from localhost ([127.0.0.1]:37281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scBYh-0000h6-GK for submit@debbugs.gnu.org; Thu, 08 Aug 2024 18:24:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:51454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scBYf-0000gx-7l for submit@debbugs.gnu.org; Thu, 08 Aug 2024 18:24:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1scBYD-0002Rl-Nu for guix-patches@gnu.org; Thu, 08 Aug 2024 18:24:05 -0400 Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1scBY9-00084M-6K for guix-patches@gnu.org; Thu, 08 Aug 2024 18:24:04 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 694C840003; Thu, 8 Aug 2024 22:23:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fabionatali.com; s=gm1; t=1723155833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PhPK3cDEofWomRMwquGTkRnMqZ7Iz9AZQxdZzbJDPBk=; b=kbAYm9oIy437xZiKtTydWcxLkm+PooWMOScSnYvMtiFtX/Msmj8bbZUptJr674dIJpWbR7 DyEHOScBHRdXiWzFO0xKF0OrIzo1EUpx0MDuG0VI0Tt89R3nO1CWUKAWd4h7UbIVUGuN6+ N7hvB4UvR0v8iGxvRBqG7d+Betm8s/jo6chLtSduGufBA9ZdcYJlzCwKL1jpGc2FidvrrA x345sTEp0AIhVOqQ23/w8h7Au6DxOEQy0JHMtqh/DaakNpLulgQrXwAuvl7psL/GZ+wUXB Cpju+wJ8XxDt1Ne+1LjT9okJA5z1SnsLACNftFbeex2vgtX4dtxKbNaoleyzqA== From: Fabio Natali To: guix-patches@gnu.org Subject: [PATCH] home: services: Add home-beets-service-type. Date: Thu, 8 Aug 2024 23:21:43 +0100 Message-ID: X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Debbugs-Cc: ( , Andrew Tropin , Florian Pelz , Ludovic Courtès , Matthew Trzcinski , Maxim Cournoyer , Tanguy Le Carrour Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: me@fabionatali.com Received-SPF: pass client-ip=2001:4b98:dc4:8::222; envelope-from=me@fabionatali.com; helo=relay2-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit Cc: Fabio Natali 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.6 (--) * gnu/home/services/music.scm: New file. * gnu/local.mk: Add this. * doc/guix.texi: Document this. Change-Id: Idc23a68276cb3fb07733bb38bc38b1c5a63c1d6a --- Dear All, Anyone thinking it might be worth to have a Guix Home service for Beets? Beets⁰ is a command-line music file and metadata manager. Beets requires a YAML configuration file to define various aspects of its behaviour. 'home-beets-service-type' is a Guix Home service that can be used to create Beets' configuration file. Any feedback welcome! Thanks, cheers, Fabio. ⁰ https://beets.io doc/guix.texi | 33 +++++++++++++++++++ gnu/home/services/music.scm | 63 +++++++++++++++++++++++++++++++++++++ gnu/local.mk | 2 ++ 3 files changed, 98 insertions(+) create mode 100644 gnu/home/services/music.scm diff --git a/doc/guix.texi b/doc/guix.texi index b7eb8fd346..68d38005a2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -129,6 +129,7 @@ Copyright @copyright{} 2024 Richard Sent@* Copyright @copyright{} 2024 Dariqq@* Copyright @copyright{} 2024 Denis 'GNUtoo' Carikli@* +Copyright @copyright{} 2024 Fabio Natali@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -47092,6 +47093,38 @@ Miscellaneous Home Services This section lists Home services that lack a better place. +@subsubheading Beets Service + +@cindex Beets service, for Home +The @code{(gnu home services music)} module provides the following +service: + +@defvar home-beets-service-type +@uref{https://beets.io, Beets} is a music file and metadata manager +that can be used via its command-line interface, @command{beet}. Beets +requires a YAML configuration file and this Guix Home service is to +create such file. +@end defvar + +The service can be used as follows: + +@lisp +(service home-beets-service-type + (home-beets-configuration (directory "/home/alice/music"))) +@end lisp + +Additional options can be specified via the service wild-card field +@code{extra-options}: + +@lisp +(service home-beets-service-type + (home-beets-configuration + (directory "/home/alice/music") + (extra-options '(" +import: + move: yes")))) +@end lisp + @subsubheading Dictionary Service @cindex dictionary service, for Home diff --git a/gnu/home/services/music.scm b/gnu/home/services/music.scm new file mode 100644 index 0000000000..3813ea230e --- /dev/null +++ b/gnu/home/services/music.scm @@ -0,0 +1,63 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2024 Fabio Natali +;;; +;;; 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 music) + #:use-module (guix gexp) + #:use-module (guix records) + #:use-module (gnu home services) + #:use-module (gnu packages music) + #:use-module (gnu packages video) + #:export (home-beets-configuration + home-beets-service-type)) + +;;; Commentary: +;;; +;;; A Guix Home service to configure Beets, a music file and metadata manager. +;;; +;;; Code: + +(define-record-type* + home-beets-configuration make-home-beets-configuration + home-beets-configuration? + (package home-beets-package (default beets)) + (directory home-beets-directory (default #f)) + (extra-options home-beets-extra-options (default '())) + (extra-packages home-beets-extra-packages (default (list ffmpeg)))) + +(define (home-beets-configuration->file config) + "Return the Beets configuration file corresponding to CONFIG." + (match-record config + (directory extra-options) + (plain-file "beets.yaml" + (string-append "directory: " directory "\n" + (string-join extra-options "\n" 'suffix))))) + +(define home-beets-service-type + (service-type + (name 'home-beets) + (extensions + (list + (service-extension home-profile-service-type + (lambda (config) + (cons* (home-beets-package config) + (home-beets-extra-packages config)))) + (service-extension home-xdg-configuration-files-service-type + (lambda (config) + (list `("beets/config.yaml" + ,(home-beets-configuration->file config))))))) + (description "Configure Beets, a music file and metadata manager."))) diff --git a/gnu/local.mk b/gnu/local.mk index 4d7b17e4b4..efdf7267fd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -66,6 +66,7 @@ # Copyright © 2023 Troy Figiel # Copyright © 2024 David Elsing # Copyright © 2024 Ashish SHUKLA +# Copyright © 2024 Fabio Natali # # This file is part of GNU Guix. # @@ -107,6 +108,7 @@ GNU_SYSTEM_MODULES = \ %D%/home/services/mail.scm \ %D%/home/services/media.scm \ %D%/home/services/messaging.scm \ + %D%/home/services/music.scm \ %D%/home/services/pm.scm \ %D%/home/services/shells.scm \ %D%/home/services/shepherd.scm \ base-commit: 9c6353c5568a56620af43c2213a9f1cbdc2b4adf -- 2.45.2 From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 28 10:26:05 2024 Received: (at 72533-done) by debbugs.gnu.org; 28 Aug 2024 14:26:05 +0000 Received: from localhost ([127.0.0.1]:49464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjJcb-00065k-26 for submit@debbugs.gnu.org; Wed, 28 Aug 2024 10:26:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjJcX-000651-G8 for 72533-done@debbugs.gnu.org; Wed, 28 Aug 2024 10:26:02 -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 1sjJbW-0006sR-MK; Wed, 28 Aug 2024 10:24:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=y9N1loyL6XB0JHSOvXKKGgeJG/S9ocGdx7gkqfgU02w=; b=euDuuUev7oLhvHI5tw2b ZTx1p6BMlr/i5aY+QEqlmV0KXA1VerQRIeiMy2qeWRAH55kfQ29czJPRxIRrxLarf94LuFunSYne7 G2qMG8+iSJEMuGUWgMats2qQjdjviCwYWObi9eeOxnZdV3Go6VIKKUlbng9FBigwMe/FSoqPcq1yV UMT2e39DEuS63tUzvPyuPVNuR8wQxGX6EFLZbSMfUCefGtU1SeiXH6k5L7vfROAtfOBSFFXTdsN1y RdV6fhu2vKcZBzF/qmIOmmAP9hJeIxNTZ87GXIckF5zniRkG2JiL5HhyU57J1BpGadXeHd7C75ek2 d1kooOz2Lz0ApA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Fabio Natali Subject: Re: [bug#72533] [PATCH] home: services: Add home-beets-service-type. In-Reply-To: (Fabio Natali's message of "Thu, 8 Aug 2024 23:21:43 +0100") References: Date: Wed, 28 Aug 2024 16:24:47 +0200 Message-ID: <87cylslo7k.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) 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: 72533-done Cc: Tanguy Le Carrour , Maxim Cournoyer , 72533-done@debbugs.gnu.org, paren@disroot.org, Florian Pelz , Andrew Tropin , Matthew Trzcinski 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 Fabio, Fabio Natali skribis: > * gnu/home/services/music.scm: New file. > * gnu/local.mk: Add this. > * doc/guix.texi: Document this. > > Change-Id: Idc23a68276cb3fb07733bb38bc38b1c5a63c1d6a > --- > Dear All, > > Anyone thinking it might be worth to have a Guix Home service for Beets? > > Beets=E2=81=B0 is a command-line music file and metadata manager. Beets r= equires a YAML > configuration file to define various aspects of its > behaviour. 'home-beets-service-type' is a Guix Home service that can be u= sed to > create Beets' configuration file. I don=E2=80=99t use Beets so far but it seems like a good idea to me. Applied, thanks! :-) Ludo=E2=80=99. From unknown Sun Aug 17 04:17:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 26 Sep 2024 11:24:09 +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