diff options
| author | Estevan Castilho <tevo@riajuu.net> | 2026-03-22 18:02:20 +0000 |
|---|---|---|
| committer | Oleg Pykhalov <go.wigust@gmail.com> | 2026-04-03 18:03:13 +0300 |
| commit | c3a13b2593c8c03883ff2bd7b43812518396e1ea (patch) | |
| tree | a2aebebe4407813bd5fe753f66183d994c9403fd /gnu | |
| parent | 02c36a8ad87a4018d310fde26d5e0cd07fa7066b (diff) | |
home: services: niri: Use existing session dbus.
Spawning niri with `dbus-run-session` as is done here causes the compositor
and children applications to run within it's own D-Bus session bus rather than
relying on the already existing one. This causes Guix home services that rely
on a session bus to misbehave within a niri session, as the bus the services
are talking to is not the same as the one niri & applications see. Guix home
already provides a `home-dbus-service-type` for ensuring a D-Bus session bus
exists, so it makes sense to just rely on that.
* gnu/home/services/niri.scm (home-niri-service-type): Add
HOME-DBUS-SERVICE-TYPE extension.
(home-niri-shepherd-service)[requirement]: Add DBUS requirement.
[start]: Drop the 'dbus-run-session' call in favour of extending
HOME-DBUS-SERVICE-TYPE.
Change-Id: I1d402064128fe94aaaa2868e174752ef640dd31e
Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/home/services/niri.scm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gnu/home/services/niri.scm b/gnu/home/services/niri.scm index edd6d73d72f..2ab53777c81 100644 --- a/gnu/home/services/niri.scm +++ b/gnu/home/services/niri.scm @@ -19,6 +19,7 @@ (define-module (gnu home services niri) #:use-module (gnu home services) #:use-module (gnu home services shepherd) + #:use-module (gnu home services desktop) #:use-module (gnu packages bash) #:use-module (gnu packages freedesktop) #:use-module (gnu packages glib) @@ -40,14 +41,15 @@ (define (home-niri-shepherd-service config) "Return a shepherd service that runs Niri, a scrollable tiling Wayland -compositor. The service starts Niri in a DBus session with appropriate -environment variables set for a Wayland desktop session." +compositor. The service starts Niri with appropriate environment variables +set for a Wayland desktop session." (list (shepherd-service (documentation "Run Niri scrollable tiling Wayland compositor.") (provision '(niri)) + (requirement '(dbus)) (start #~(make-forkexec-constructor (list #$(file-append bash "/bin/bash") "-l" - "-c" "exec dbus-run-session niri --session") + "-c" "exec niri --session") #:environment-variables (append (list #$@(niri-configuration-environment-variables config)) '("DESKTOP_SESSION=niri" @@ -66,6 +68,8 @@ environment variables set for a Wayland desktop session." (extensions (list (service-extension home-shepherd-service-type home-niri-shepherd-service) + (service-extension home-dbus-service-type + (const '())) (service-extension home-profile-service-type (lambda (config) (list dbus |
