From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +MufI82gR2P/XgEAbAwnHQ (envelope-from ) for ; Thu, 13 Oct 2022 07:23:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YAbLI82gR2OFHgAAauVa8A (envelope-from ) for ; Thu, 13 Oct 2022 07:23:25 +0200 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 496451C9B3 for ; Thu, 13 Oct 2022 07:23:25 +0200 (CEST) Received: from localhost ([::1]:35644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiqgm-0001I6-Cw for larch@yhetil.org; Thu, 13 Oct 2022 01:23:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiqgS-0001Ho-Qh for guix-patches@gnu.org; Thu, 13 Oct 2022 01:23:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59880) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiqgQ-0001uv-Rw for guix-patches@gnu.org; Thu, 13 Oct 2022 01:23:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oiqgQ-0007Wz-G4 for guix-patches@gnu.org; Thu, 13 Oct 2022 01:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58454] [PATCH v3] gnu: home: Add home-dbus-service-type. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 Oct 2022 05:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58454 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58454@debbugs.gnu.org Cc: "\(" X-Debbugs-Original-To: "( via Guix-patches via" , 58454@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166563857928918 (code B ref -1); Thu, 13 Oct 2022 05:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Oct 2022 05:22:59 +0000 Received: from localhost ([127.0.0.1]:58956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiqgN-0007WL-5M for submit@debbugs.gnu.org; Thu, 13 Oct 2022 01:22:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:60824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiqgL-0007W8-3R for submit@debbugs.gnu.org; Thu, 13 Oct 2022 01:22:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiqgK-0001HS-Un for guix-patches@gnu.org; Thu, 13 Oct 2022 01:22:56 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:58811) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiqgI-0001uV-Be for guix-patches@gnu.org; Thu, 13 Oct 2022 01:22:56 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 368E3100004; Thu, 13 Oct 2022 05:22:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1665638571; 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: in-reply-to:in-reply-to:references:references; bh=N5ls8QvFKxHe3ZD9XL006k5eT29NMEp43XTO0nob8a8=; b=C8+KZbs8f3LfShpZvGjavJn2GfHQq/EqjnsGtUIIQvEaNEcXwQ9ik4hr1xDfqS37iI34wA YY2zCf6GDAD3U24ktLLFUOzmuxubuQcElwk5ahMYtmcnuwnrecY1TJ1RoH4cWou48NgG1q sHmYFUOXMxrCCnGdm+fEoLEsbU009DvxdzmKnmdqoqhcl3xJwJal/m9UzBd7m9yq5D8sFa 5G8pvdooGzl+rbhdpSN2snYugdmmdBKE5XOSOEgqpqgLu/InC85jXQnfq3N9myAPIksbbA PPyQScxb93iDzngcy2UDIKJdAX97aLutdmzkDh4fUWnygZ5JrVH5qkzQThw+SA== From: Andrew Tropin In-Reply-To: <20221012202139.8379-1-paren@disroot.org> References: <20221011194513.26008-1-paren@disroot.org> <20221012202139.8379-1-paren@disroot.org> Date: Thu, 13 Oct 2022 09:22:33 +0400 Message-ID: <87y1tkcn6u.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=217.70.178.231; envelope-from=andrew@trop.in; helo=relay11.mail.gandi.net X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665638605; 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: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=N5ls8QvFKxHe3ZD9XL006k5eT29NMEp43XTO0nob8a8=; b=m+40wEMYJC5NQkbqEpE0BzqOv6Xa3gLQlUskDejzzN6qFp2EPQk1XRNPGD5JYKXN2l/ag0 xijaI2I5BRHZwyHRQJFEdICvx7hoXjvdKgdqjDPQDNrwzR20mtnuFCWf5mBaLWifFKUjRB 9wSkv/+Ax5h1tPnPu4+FYKKJjzhSntLj5C1Gh064mnYRfeBY8tjaP4Lmg63AXXbs1yfzzI iCf2HeQy0Fho3rhzOpfwbcpdSUU+12if+iPKQBHkZmGWVlZxmoI+l30xgu7ZMbn8ub9JSw u39b/UaZs4WbHQIxZv6EfJU3M3J+gcjkjF4kuTM1EKEv/XGIkrKXeEtbKMYSUg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665638605; a=rsa-sha256; cv=none; b=VRwKgIA4u6lL1vSZ8ryBZuLpANsfJ/05rq7Aa9mS3+r8MCFXDof383dSPojJIKGQCuytXo q9JaTOIjvgXor7YCFsAXBdd4WP+oAurItL/ZdisssmtPLq5ZNEWc2EuH8Q7k9olf3zqsRM fDDHKTDjoc7DiagLNw+g08ICgZ4lNiPKBlqR9BU0QOAYOD2LT+9gt2KvSQ052N3lpg3ogW kCMGFZ9f2u3CEbUJF/WR7jR7M6X2QcCUglfzgXPCA65kgf2Q2iloYZMNN0NZxgNTqp6axm /svcRAkZQx9zPMxeizd/rU9PPntSv40kWyflQlyJhl0EtigrDgVyQs4E7kJygQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=C8+KZbs8; 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" X-Migadu-Spam-Score: 0.20 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=C8+KZbs8; 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" X-Migadu-Queue-Id: 496451C9B3 X-Spam-Score: 0.20 X-Migadu-Scanner: scn1.migadu.com X-TUID: A2FwuIvJ2PmA --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-10-12 21:21, "\( via Guix-patches" via wrote: > * gnu/home/services/desktop.scm (home-dbus-service-type): New > variable. > (home-dbus-configuration): New record type. > * doc/guix.texi: Document them. > --- > doc/guix.texi | 14 +++++++++ > gnu/home/services/desktop.scm | 54 ++++++++++++++++++++++++++++++++++- > 2 files changed, 67 insertions(+), 1 deletion(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index 5867acb746..78ada9c301 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -41262,6 +41262,20 @@ format. >=20=20 > @end deftp >=20=20 > +@defvr {Scheme Variable} home-dbus-service-type > +This is the service type for running a session-specific D-Bus, for > +unprivileged applications that require D-Bus to be running. > +@end defvr > + > +@deftp {Data Type} home-dbus-configuration > +The configuration record for @code{home-dbus-service-type}. > + > +@table @asis > +@item @code{dbus} (default: @code{dbus}) > +The package providing the @code{/bin/dbus-daemon} command. > +@end table > +@end deftp > + > @node Guix Home Services > @subsection Guix Home Services >=20=20 > diff --git a/gnu/home/services/desktop.scm b/gnu/home/services/desktop.scm > index b0f4d969b0..1f41ace766 100644 > --- a/gnu/home/services/desktop.scm > +++ b/gnu/home/services/desktop.scm > @@ -1,5 +1,6 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright =C2=A9 2022 Ludovic Court=C3=A8s > +;;; Copyright =C2=A9 2022 ( > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -20,6 +21,7 @@ (define-module (gnu home services desktop) > #:use-module (gnu home services) > #:use-module (gnu home services shepherd) > #:use-module (gnu services configuration) > + #:autoload (gnu packages glib) (dbus) > #:autoload (gnu packages xdisorg) (redshift) > #:use-module (guix records) > #:use-module (guix gexp) > @@ -27,8 +29,10 @@ (define-module (gnu home services desktop) > #:use-module (ice-9 match) > #:export (home-redshift-configuration > home-redshift-configuration? > + home-redshift-service-type >=20=20 > - home-redshift-service-type)) > + home-dbus-configuration > + home-dbus-service-type)) >=20=20 > > ;;; > @@ -172,3 +176,51 @@ (define home-redshift-service-type > (description > "Run Redshift, a program that adjusts the color temperature of displ= ay > according to time of day."))) > + > + > +;;; > +;;; D-Bus. > +;;; > + > +(define-record-type* > + home-dbus-configuration make-home-dbus-configuration > + home-dbus-configuration? > + (dbus home-dbus-dbus ;file-like > + (default dbus))) > + > +(define (home-dbus-shepherd-services config) > + (list (shepherd-service > + (documentation "Run the D-Bus daemon in session-specific mode.") > + (provision '(dbus-session)) Changed it to just dbus. > + (start #~(make-forkexec-constructor > + (list #$(file-append (home-dbus-dbus config) > + "/bin/dbus-daemon") > + "--nofork" "--session" "--nosyslog" Removed --nosyslog. > + (format #f "--address=3Dunix:path=3D~a/bus" > + (or (getenv "XDG_RUNTIME_DIR") > + (format #f "/run/user/~a" > + (getuid))))) > + #:environment-variables > + #~(list "DBUS_VERBOSE=3D1") > + #:log-file > + (format #f "~a/dbus-daemon.log" Changed it to dbus.log. > + (or (getenv "XDG_LOG_HOME") > + (format #f "~a/.local/var/log" > + (getenv "HOME")))))) > + (stop #~(make-kill-destructor))))) > + > +(define (home-dbus-environment-variables config) > + '(("DBUS_SESSION_BUS_ADDRESS" > + . "unix:path=3D${XDG_RUNTIME_DIR:-/run/user/$UID}/bus"))) > + > +(define home-dbus-service-type > + (service-type > + (name 'home-dbus) > + (extensions > + (list (service-extension home-shepherd-service-type > + home-dbus-shepherd-services) > + (service-extension home-environment-variables-service-type > + home-dbus-environment-variables))) > + (default-value (home-dbus-configuration)) > + (description > + "Run the session-specific D-Bus inter-process message bus."))) Applied with small adjustments mentioned above, will push soon, thank you for the patch. Now I can also close the TODO in rde :) https://git.sr.ht/~abcdw/rde/tree/111130ebf3ef4a9143186604c054aeb807a84063/= rde/features/base.scm#L305 =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmNHoJkACgkQIgjSCVjB 3rByLg//TkBpBGQb0/GBBM3Txq2MB4D9iyXiErHjiId/qeGL54yb41gPocnO9ZZU j3CJAEq8zFAoAf2dGAwyut4j7kYc2z4LEO60Cs6NTTOZU4kYHYTI7m1Xp6dMGLsF eZPDNOXoxY/ICof/fxQOb5+eUqMWDRcSD3Jo+T9nOXCbW6J4RS4b+YfulcoZuo7Z K2Oy2Fly70Frd3ZM0TQv3PgZU4qlkVyoJc8YtlZt0zo0LAoKuw/4I4AyJSVsOOV+ 9MSM3O68BO51G66tMvbrW2OtRwLguwVfEr1m8mmeuqha+S6P6CjNgXGu6qX82W1I q8jwT7wFVKe2WAK5nofGcBLShj/yXnb4BNzMC8GoeeEhJzH3t30XtuhdjQhpKgpK GCR+MLknWjJAjqMS9/nD6rFcT2vzguqjsV2875D8aHsCM+mvtIRJh1zkAHVrGCLu PekQT3kx0eTROT+59FlhZ7Gq/4o//3JK81EvH/QbUjA07Un+lCyRufMmXOMlHJxj cIAzk1yH1UO+X2Xw2+9k7svzqUEdqcBu4hWAcCNuzfqJL8czfMMkIaWRElVeUi36 ZmZfb3CNJWD5Y6ab0FaCRUO7CXm7nK3GwtlUj5BcGjsqg/rdnagrdAhaup6YELtr 6pGVi29bLOEr9CgRSee17MFizWt5ML9tD7kMG9MQjdUsIHtmo9o= =6Sw5 -----END PGP SIGNATURE----- --=-=-=--