From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id IJyGJlhmRWb5bQAAe85BDQ:P1 (envelope-from ) for ; Thu, 16 May 2024 03:50:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id IJyGJlhmRWb5bQAAe85BDQ (envelope-from ) for ; Thu, 16 May 2024 03:50:16 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=retrospec.tv header.s=fm2 header.b=FnKyGfzo; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b="B CH1/Bm"; dmarc=none; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715824216; a=rsa-sha256; cv=none; b=JQMprLz0N7jWDkE5QusHwAsLJ4cndetETvrrvPHrbpHYd/kJN4HAfj53zDWLc5UZRiQrhS Vy7CfCvf6nVL17WWeQB9mYrxx+Ha8Le5GKwfBvpbXApc8a7tQPLfDn8hWnVMqO0VnvCWHz Jene7xQcAPnSM+xfhMpHkMiwVnyWuagfzhAOdJa3Mk9DI6lt9eq3OBfigS8RaBFHyLJdY7 TuLAIvdNgYeY8cC7pjPA/X7N3gBqtTbezopfnAYhbOG/mnnXfxmswXkQFt6N+srlFDfJFt hJxgscBmid0WTLuZRLEmCW6u49SfpkJD7Qk2L9T4IKbCSnJsosaUCbNMrpd3/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=retrospec.tv header.s=fm2 header.b=FnKyGfzo; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b="B CH1/Bm"; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1715824216; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=BYBnHl6Nmg+FgD5owk5DrINiB7KcobkLWYe6F9lmUpw=; b=ZsHR7Yk/VtItX9lR0jQL+gZBuArdp71kMUxbac/hMKXfO9pMzYrdSLxC72GYHArLqMUhHD Qgc6+7pryYSpBMIySwfqioxKt2bV12XL1W6tGrnVcwpgsn9NLYNSh+1MZQa7FgDo3SpGfz h464i/zHHgiXTXZPqZMPam2V+0eGvhvwCrBomS2+v6aowuOcXdxGXV3qb/yVzUYlZwHaVV mW9Z3vSYqrxLtNpNZx6HFL9JrgFuPIsKf3mAG1g/1i81dnGeBp+Rj1sjTnoeHjL96fDnu2 AO0Vylr6bXEV8v57NhDxWQ8C1fozccSyvuIgkc5V+wiRpKD7xxnNZ5CN6XWemg== 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 BA76021B3B for ; Thu, 16 May 2024 03:50:15 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7QFw-0006vX-HA; Wed, 15 May 2024 21:50:04 -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 1s7QFs-0006v1-UR for guix-patches@gnu.org; Wed, 15 May 2024 21:50:01 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7QFs-0000DJ-Lf for guix-patches@gnu.org; Wed, 15 May 2024 21:50:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7QFu-0002zc-8Q for guix-patches@gnu.org; Wed, 15 May 2024 21:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69692] [PATCH] gnu: Add home-jellyfin-mpv-shim-service-type. Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 May 2024 01:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69692 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Skyler Ferris Cc: 69692@debbugs.gnu.org Received: via spool by 69692-submit@debbugs.gnu.org id=B69692.171582417511484 (code B ref 69692); Thu, 16 May 2024 01:50:02 +0000 Received: (at 69692) by debbugs.gnu.org; 16 May 2024 01:49:35 +0000 Received: from localhost ([127.0.0.1]:45660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7QFS-0002zA-HV for submit@debbugs.gnu.org; Wed, 15 May 2024 21:49:35 -0400 Received: from fout8-smtp.messagingengine.com ([103.168.172.151]:55747) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7QFJ-0002z4-2h for 69692@debbugs.gnu.org; Wed, 15 May 2024 21:49:31 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.nyi.internal (Postfix) with ESMTP id 615E21381043; Wed, 15 May 2024 21:49:17 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 15 May 2024 21:49:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1715824157; x=1715910557; bh=BYBnHl6Nmg+FgD5owk5DrINiB7KcobkLWYe6F9lmUpw=; b= FnKyGfzoXVhje0fnF3IlrEXdHQBPLXciYgzGszSKre7Y15E2HnCVI3QnQoDzMFHe 2UHMzm1/P1zVHh1LiuBYGqEXzkW0cu9tt+kCylN8018t78i4leUZPNi0v596mlm4 XKgFirEjF0CCnmLJtKyutX2GXxYcdnp6tXDLF5RfL26c9NVeHTcQgG4HcIEfEpeP TdiYY/Co06FhhsYfamM3P6NoI5JoJEOqrNPH/kH1CRUVOAEwagsqdcL6RqxcSr3e LsYzT0XxEF3J9838Ch5YdpyC/MKgSWkhZtneI4IzvyJUdzPfJ6s/k/Q/mtqYZqkJ l106IPbi1iViYyXD1cZslg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1715824157; x= 1715910557; bh=BYBnHl6Nmg+FgD5owk5DrINiB7KcobkLWYe6F9lmUpw=; b=B CH1/BmV7r6J97M4tQ/6VoJAcH5lPkPvbFSjGLgccKfLYlULEX9AHLRaAL0eZlPSW yIAMX9kK5+rOJMMmZRjbVjbNerDotuiv5Fq1C3Gg9BDjlBcYyflHkZ6iFkxsq6Mj 4xh7632poL49MRJ08BKvYeQeYlijkpwZc0+/x4z/3Fz8qQROk5cY878Cny/ganFM eumU7+NCd2koqd260brB9nLYnMNjh99CAxvqhNszPGQnINjwGvgu1hoR4WFR46ZW msYJSg0cAyGwC5z7zlUs6QU5lZB2gg/NhUUZeD2fD8cMr1DdwfSsgyxcfw7IHUMp 4PgzuLFjnv/ICAR+/ZG2A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdegledghedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpehffgfhvfevufffjgfkgggtgfesth hqredttderjeenucfhrhhomhepkfgrnhcugfhurhgvuceoihgrnhesrhgvthhrohhsphgv tgdrthhvqeenucggtffrrghtthgvrhhnpefhhfegieekfeegueehfeelteejhfeugfelvd eggfduvdevteelleetkeelffdtkeenucffohhmrghinhepghhnuhdrohhrghenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehirghnsehrvghtrh hoshhpvggtrdhtvh X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 May 2024 21:49:16 -0400 (EDT) References: <7d396f735f82369731c90195c7b8e7dc0fcf9acd.1710048182.git.ian@retrospec.tv> <8c8f0aee-f099-46ad-91f0-89e7b1dd789d@protonmail.com> User-agent: mu4e 1.8.13; emacs 28.2 From: Ian Eure Date: Wed, 15 May 2024 18:27:58 -0700 In-reply-to: <8c8f0aee-f099-46ad-91f0-89e7b1dd789d@protonmail.com> Message-ID: <87v83ev84k.fsf@meson> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: 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-Migadu-Queue-Id: BA76021B3B X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -1.97 X-Spam-Score: -1.97 X-TUID: 8PuyGEAZrYJe Hi Skyler, Sorry for the extremely delayed response here. Skyler Ferris writes: > Hi Ian, > > I don't have the setup required to try running this service but=20 > 2 things stand out to me when reading through it. > > On 3/9/24 21:24, Ian Eure wrote: > > +To enable, add this to your home services: > + > +@lisp > +(service home-jellyfin-mpv-shim-service-type #f) > +@end lisp > > You can add a default-value field to the service definition like=20 > so: > > (define-public home-jellyfin-mpv-shim-service-type > (service-type > (name 'home-jellyfin-mpv-shim) > (default-value #f) > (extensions (list (service-extension=20 > home-shepherd-service-type > jellyfin-mpv-shim-shepherd-servic= e) > ;; Ensure 'home-x11-service-type' is=20 > instantiated so we > ;; can depend on the Shepherd 'x11-display'=20 > service. > (service-extension home-x11-service-type > (const #t)))) > (description "Run Jellyfin MPV Shim."))) > Then, users can simply use (service=20 > home-jellyfish-mpv-shim-service-type) without having to specify=20 > #f manually And if the > service ever changes in the future and this value becomes useful=20 > then you can provide a reasonable default without requiring > users to change their=20 > code. (https://guix.gnu.org/manual/en/html_node/Service-Reference.html) > Thank you for the suggestion, I=E2=80=99ll incorporate it and send a=20 revised patch after we=E2=80=99re in agreement on the launch behavior. > + > +The service only starts if @code{jellyfin-mpv-shim} has been=20 > configured with a remote server and credentials. This must be=20 > done manually, by launching @code{jellyfin-mpv-shim}. After=20 > configuring the server, the service will start automatically=20 > when you log in. > > Would it make sense to launch this program automatically if it=20 > is not configured? > I don=E2=80=99t think it would. When it launches in an unconfigured=20 state, you get a very generic "Server Configuration" window, with=20 no icon or indication what server you=E2=80=99re configuring, or what for.= =20 It makes perfect sense if you run the program and that window=20 appears, and not much sense at all if it just happens when you log=20 in. > Presumably if someone adds the service then they want to=20 > configure a server. Agreed. However, configuring the server is a manual action, and=20 it doesn=E2=80=99t feel burdensome to manually run the program to do it.=20 There isn=E2=80=99t a good way to configure the remote server=20 declaratively, since this process involves exchanging a username=20 and password for an authentication token, which must be done over=20 the network. You probably wouldn=E2=80=99t want to commit your auth token= =20 to a repo containing your home configuration, and Guix has no=20 facility for securely handling things like this. So it has to be=20 done by hand. > The value passed to the service could be used to specify whether=20 > or not the program should automatically launch so that users who=20 > do not want this behavior can disable it (note that if you=20 > decide to implement this then the configuration value should be=20 > an instance of a new structure defined to store configuration=20 > for this service, not a simple boolean; again, this makes things=20 > easier in the future so that if you want to add more fields=20 > pre-existing code will still work). > Making auto-launch configurable doesn=E2=80=99t seem like a good idea to=20 me. It would only ever apply to the very first launch, and=20 wouldn=E2=80=99t significantly change the bounds of the problem. If the=20 default is to launch unconfigured, you get the confusing behavior=20 I want to avoid. If the default is to not launch unconfigured, I=20 don=E2=80=99t think anyone would ever change that setting -- it=E2=80=99s b= e much=20 easier to launch the program than to change the setting and `guix=20 home reconfigure'. Thanks, =E2=80=94 Ian