From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id ULbOIKdSx2YUsAAA62LTzQ:P1 (envelope-from ) for ; Thu, 22 Aug 2024 15:01:03 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id ULbOIKdSx2YUsAAA62LTzQ (envelope-from ) for ; Thu, 22 Aug 2024 17:00:55 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=tqgKzPSU; dkim=fail ("headers rsa verify failed") header.d=retrospec.tv header.s=fm3 header.b=Jyzf9FBT; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b="b rrL1VK"; 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=1724338855; 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=D5KDzfXEeySNW43O6Spd5D81JxRNsVdNiD2lHCAu9tY=; b=sBLramhH5jVnzMOWEH4m69n6MtiGwqGHjTtl9/7BC8wXwqPgHxIKqS0kDeQlgYo9cdQNY3 FRwCt8jqMHx0/8Od2HMmwXALlGsAjLHZICfoMNAkhcs8i++AX5gsfBSrCelLm8JLG/Xr59 RxXZeZtb2PgqWIMv056TnqCAianHNG0Tw2Ouy8SDG5riqiBGkZUM1VjqzWFo0MWWE+0Sov SsPlw72VtZU2vZEaxFUJBq/WeyWw4AajM5oseUUSN5XJpLuZliSMGR/3a1wC+ZjOO42/4n qUejbjyqtg0S1PrEUkimmwuiKBC/WpMqR/JygZd551NoHxyW25DNA30jgeZJtg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1724338855; a=rsa-sha256; cv=none; b=aLQPnVPCGdaUTFAJI1hUDq/LKZdH5xIj0BxNGQb61BAFM3KRA9bG3nQ1qe58or2dwoZV77 9JnmyvVMnZbsjd1c58kfDG93d4wWD4FpIn7UXqS/+1rg156GkzK5QOeXhn+6x9AZxvrDhJ Tl41S4Joid4Ue9Kr7Lhwi2yxHlTgqbYo3957MvHBtoPU4/sJ3jhPwOZusCZDs16wjGR6xt q5uOR+uz1NtqBSL6GTZeOrY76GthdO4UJdwAHaqTxOV61yodqLjv7SB8g9Im5ATqMG/8eF E4M5Uj8ldYJ02nOxhZsnJ0sDOqrJJrjjJruTqbiduw4YuH7QjmHFWobAAyF5DA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=tqgKzPSU; dkim=fail ("headers rsa verify failed") header.d=retrospec.tv header.s=fm3 header.b=Jyzf9FBT; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b="b rrL1VK"; 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" 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 489566318D for ; Thu, 22 Aug 2024 17:00:53 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sh9IV-0006Ec-1P; Thu, 22 Aug 2024 11:00:23 -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 1sh9IQ-0006EF-JJ for guix-patches@gnu.org; Thu, 22 Aug 2024 11:00:19 -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 1sh9IN-0003rV-NX for guix-patches@gnu.org; Thu, 22 Aug 2024 11:00:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:In-reply-to:Date:From:References:To:Subject; bh=D5KDzfXEeySNW43O6Spd5D81JxRNsVdNiD2lHCAu9tY=; b=tqgKzPSUy4/fxnhs2LO9oAEwdM/aA9rQrFy1DqdED19PEf+c31IuehkRNqLBYirPizE8N0U3q2gd/PhKPfHTUefbdMXLZgyoBppg/6ZdYfi+l5dHLTFfn7nQaHBl3R+9MVraplJuv4UO1e2BrNWmmG8AmBO5OiztCmRPYgAIgtIkDPW2quUaspNXko4Vu3t5HPzi7nQNrec/yBInlyToSwt6yOHdOelWQXg/fs37XARk7+UZzPaF6KnAFb23d61XFXJpDs/B968H5TdmDm+arpvVleUjbFjhEYECoDd52oFTdozWrWjVnEXFj7M77D5s0k+zpmjeRk1AaekK6gbZAQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sh9J7-0005Cv-Iv for guix-patches@gnu.org; Thu, 22 Aug 2024 11:01:01 -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, 22 Aug 2024 15:01:01 +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.172433880519848 (code B ref 69692); Thu, 22 Aug 2024 15:01:01 +0000 Received: (at 69692) by debbugs.gnu.org; 22 Aug 2024 15:00:05 +0000 Received: from localhost ([127.0.0.1]:38228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sh9ID-0005A3-39 for submit@debbugs.gnu.org; Thu, 22 Aug 2024 11:00:05 -0400 Received: from fhigh6-smtp.messagingengine.com ([103.168.172.157]:38005) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sh9I9-000594-B7 for 69692@debbugs.gnu.org; Thu, 22 Aug 2024 11:00:03 -0400 Received: from phl-compute-01.internal (phl-compute-01.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id E67CD11519B8; Thu, 22 Aug 2024 10:59:09 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Thu, 22 Aug 2024 10:59:09 -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=fm3; t=1724338749; x=1724425149; bh=D5KDzfXEeySNW43O6Spd5D81JxRNsVdNiD2lHCAu9tY=; b= Jyzf9FBTLTjBcWZDRX75h4fUCuhi4+3EwIpCJlrIkU/uEiU/5OKKv33ZsbOXBYEN 5LmHwY5g05jETea+BZA4Ki4KIPfsr+Vz13cSCgbI3VN4iXfCShhv7yLRoXd2+7Ee wi3kTA02/thAVmnkoIXCeyOd17gfS+JFFDWO3BffE/wDoDJsRdmgXZ+qIZ1qEgrL hzi7fxjuYa5p+qikeAaKIb0ILpVdR5fYu/tedZw1NcSwD567V3NrPYB5OUq+196L 5IUP7nsnaTItyQcxhGq4xskVNWRrN2XcyARGxc5t9FyfR3gGE4xX1oszuw9fJ8lg 1cqzhPR6QG8Gp+aXe76/zw== 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=fm1; t=1724338749; x= 1724425149; bh=D5KDzfXEeySNW43O6Spd5D81JxRNsVdNiD2lHCAu9tY=; b=b rrL1VKWWrtxWl78M88EHJvtdy/D3a6f7Fy1NcV+t1qTSODw6xkEryTkrRYZpqeKa OUG9QH5JJ1035mu1c61KxYwLIZVmOxpocAnbHuWTqDuSdkgyDcrOIup7cl5mttn8 Jm3OAN0gOLH4ue4ZqJvFFGKrU9QtsirpAvM2Yt5LE38EH3PhRH+yyZmijA+lB0bx aU05cxHxENC/zfMVcjAbA6Uj0J5vwNuoXaWwN1EGjayQRuwfsdG8qqJ1yWXZVNMv Ux/HL9na5gEU562QTtmORK0wCM90ig69zCu3P7LMijyeW7Bayxpao7S0pkJFoJJ+ bsutvjxXSYIBZrp5l7vsg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddvtddgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpehffgfhvf evufffjgfkgggtgfesthhqredttderjeenucfhrhhomhepkfgrnhcugfhurhgvuceoihgr nhesrhgvthhrohhsphgvtgdrthhvqeenucggtffrrghtthgvrhhnpefhhfegieekfeegue ehfeelteejhfeugfelvdeggfduvdevteelleetkeelffdtkeenucffohhmrghinhepghhn uhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehirghnsehrvghtrhhoshhpvggtrdhtvhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepieelieelvdesuggvsggsuhhgshdrghhnuhdroh hrghdprhgtphhtthhopehskhihvhhinhgvsehprhhothhonhhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 22 Aug 2024 10:59:08 -0400 (EDT) References: <7d396f735f82369731c90195c7b8e7dc0fcf9acd.1710048182.git.ian@retrospec.tv> <8c8f0aee-f099-46ad-91f0-89e7b1dd789d@protonmail.com> <87v83ev84k.fsf@meson> User-agent: mu4e 1.8.13; emacs 28.2 From: Ian Eure Date: Thu, 22 Aug 2024 07:57:28 -0700 In-reply-to: <87v83ev84k.fsf@meson> Message-ID: <87wmk838oz.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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -7.11 X-Spam-Score: -7.11 X-Migadu-Queue-Id: 489566318D X-Migadu-Scanner: mx11.migadu.com X-TUID: LDOcHpDMc8E1 Hi Skyler, Did you have any other thoughts or feedback on this patch? I=E2=80=99d=20 like to see this in Guix proper. Thanks, =E2=80=94 Ian Ian Eure writes: > 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=20 >> like so: >> >> (define-public home-jellyfin-mpv-shim-service-type >> (service-type >> (name 'home-jellyfin-mpv-shim) >> (default-value #f) >> (extensions (list (service-extension >> home-shepherd-service-type >> jellyfin-mpv-shim-shepherd-servi= ce) >> ;; Ensure 'home-x11-service-type' is >> instantiated so we >> ;; can depend on the Shepherd=20 >> 'x11-display' >> service. >> (service-extension home-x11-service-type >> (const #t)))) >> (description "Run Jellyfin MPV Shim."))) >> Then, users can simply use (service >> 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=20 >> useful >> then you can provide a reasonable default without requiring >> users to change their >> 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 >> 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 when you log=20 >> 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 no=20 > icon or > indication what server you=E2=80=99re configuring, or what for. It makes > perfect sense if you run the program and that window appears,=20 > and not > much sense at all if it just happens when you log 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=20 > it. There > isn=E2=80=99t a good way to configure the remote server declaratively,=20 > since > this process involves exchanging a username and password for an > authentication token, which must be done over the network. You > probably wouldn=E2=80=99t want to commit your auth token to a repo=20 > containing > your home configuration, and Guix has no facility for securely > handling things like this. So it has to be done by hand. > > >> The value passed to the service could be used to specify=20 >> whether or >> not the program should automatically launch so that users who=20 >> do not >> want this behavior can disable it (note that if you decide to >> implement this then the configuration value should be an=20 >> instance of >> a new structure defined to store configuration for this=20 >> service, not >> a simple boolean; again, this makes things easier in the future=20 >> so >> that if you want to add more fields pre-existing code will=20 >> 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 wouldn=E2=80=99t > significantly change the bounds of the problem. If the default=20 > is to > launch unconfigured, you get the confusing behavior I want to=20 > avoid. > If the default is to not launch unconfigured, I don=E2=80=99t think=20 > anyone > would ever change that setting -- it=E2=80=99s be much easier to launch=20 > the > program than to change the setting and `guix home reconfigure'. > > Thanks, > > =E2=80=94 Ian