all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#67819] [PATCH] services: xorg: dbus-daemon-wrapper handle guix home directory.
@ 2023-12-14  3:02 Feng Shu
  2023-12-15  0:35 ` [bug#67819] [PATCH v2] services: xorg: dbus-daemon-wrapper handle guix home Feng Shu
  0 siblings, 1 reply; 3+ messages in thread
From: Feng Shu @ 2023-12-14  3:02 UTC (permalink / raw)
  To: 67819

From 1b8047ebb18d52923950f988adf612b251b39107 Mon Sep 17 00:00:00 2001

* gnu/services/xorg.scm (dbus-daemon-wrapper): Handle guix home directory.
---
 gnu/services/xorg.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 9235295dd6..56d3c737d9 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -987,6 +987,11 @@ (define user-profile
                 (lambda (pw)
                   (string-append (passwd:dir pw) "/.guix-profile"))))
 
+       (define guix-home-profile
+         (and=> (getpw (getuid))
+                (lambda (pw)
+                  (string-append (passwd:dir pw) "/.guix-home/profile"))))
+
        ;; If we are able to find the user's profile, we can add it to
        ;; the search paths set below.  We need to do this so that D-Bus
        ;; can start services installed by the user.  This allows
@@ -995,7 +1000,9 @@ (define user-profile
        ;; in the user's profile.  See <https://bugs.gnu.org/35267>.
        (define profiles
          (if user-profile
-             (list user-profile system-profile)
+             (if guix-home-profile
+                 (list user-profile guix-home-profile system-profile)
+                 (list user-profile system-profile))
              (list system-profile)))
 
        (setenv "XDG_CONFIG_DIRS"
-- 
2.39.2




-- 





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#67819] [PATCH v2] services: xorg: dbus-daemon-wrapper handle guix home
  2023-12-14  3:02 [bug#67819] [PATCH] services: xorg: dbus-daemon-wrapper handle guix home directory Feng Shu
@ 2023-12-15  0:35 ` Feng Shu
  2024-01-05 16:19   ` bug#67819: " Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Feng Shu @ 2023-12-15  0:35 UTC (permalink / raw)
  To: 67819

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: [PATCH v2] services: xorg: dbus-daemon-wrapper handle guix home --]
[-- Type: text/x-patch, Size: 1537 bytes --]

From e4a5ee8fd8a71782fdc15a8177cd1474e3135d99 Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu@163.com>
Date: Thu, 14 Dec 2023 11:02:51 +0800
Subject: [PATCH v2] services: xorg: dbus-daemon-wrapper handle guix home
 directory.

* gnu/services/xorg.scm (dbus-daemon-wrapper): Handle guix home directory.
---
 gnu/services/xorg.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 9235295dd6..56d3c737d9 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -987,6 +987,11 @@ (define user-profile
                 (lambda (pw)
                   (string-append (passwd:dir pw) "/.guix-profile"))))
 
+       (define guix-home-profile
+         (and=> (getpw (getuid))
+                (lambda (pw)
+                  (string-append (passwd:dir pw) "/.guix-home/profile"))))
+
        ;; If we are able to find the user's profile, we can add it to
        ;; the search paths set below.  We need to do this so that D-Bus
        ;; can start services installed by the user.  This allows
@@ -995,7 +1000,9 @@ (define user-profile
        ;; in the user's profile.  See <https://bugs.gnu.org/35267>.
        (define profiles
          (if user-profile
-             (list user-profile system-profile)
+             (if guix-home-profile
+                 (list user-profile guix-home-profile system-profile)
+                 (list user-profile system-profile))
              (list system-profile)))
 
        (setenv "XDG_CONFIG_DIRS"
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#67819: [PATCH v2] services: xorg: dbus-daemon-wrapper handle guix home
  2023-12-15  0:35 ` [bug#67819] [PATCH v2] services: xorg: dbus-daemon-wrapper handle guix home Feng Shu
@ 2024-01-05 16:19   ` Ludovic Courtès
  0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2024-01-05 16:19 UTC (permalink / raw)
  To: Feng Shu; +Cc: 67819-done

Hi,

Feng Shu <tumashu@163.com> skribis:

>>From e4a5ee8fd8a71782fdc15a8177cd1474e3135d99 Mon Sep 17 00:00:00 2001
> From: Feng Shu <tumashu@163.com>
> Date: Thu, 14 Dec 2023 11:02:51 +0800
> Subject: [PATCH v2] services: xorg: dbus-daemon-wrapper handle guix home
>  directory.
>
> * gnu/services/xorg.scm (dbus-daemon-wrapper): Handle guix home directory.

Good idea.

>         (define profiles
>           (if user-profile
> -             (list user-profile system-profile)
> +             (if guix-home-profile
> +                 (list user-profile guix-home-profile system-profile)
> +                 (list user-profile system-profile))
>               (list system-profile)))

I tweaked for clarity:

       (define profiles
         (append (if home-profile
                     (list home-profile)
                     '())
                 (if user-profile
                     (list user-profile)
                     '())
                 (list system-profile)))

Applied, thanks!

Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-05 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-14  3:02 [bug#67819] [PATCH] services: xorg: dbus-daemon-wrapper handle guix home directory Feng Shu
2023-12-15  0:35 ` [bug#67819] [PATCH v2] services: xorg: dbus-daemon-wrapper handle guix home Feng Shu
2024-01-05 16:19   ` bug#67819: " Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.