From 172ca43383f7017930b9230bc5f55870363d96c4 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 5 Dec 2023 12:37:37 +0100 Subject: [PATCH] home: rbw: start service with graphical session otherwise it needed to be restarted to have access to DISPLAY related env variables --- home/rbw.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/home/rbw.nix b/home/rbw.nix index 974226e..2c36d63 100644 --- a/home/rbw.nix +++ b/home/rbw.nix @@ -37,9 +37,13 @@ in { # This user service makes sure the rbw-agent is started when the user # session launches. systemd.user.services.rbw = { - Unit.Description = "rbw agent autostart"; + Unit = { + Description = "rbw agent autostart"; + After = "graphical-session.target"; + PartOf = "graphical-session.target"; + }; - Install.WantedBy = ["default.target"]; + Install.WantedBy = ["graphical-session.target"]; Service = { ExecStart = "${pkgs.rbw}/bin/rbw-agent";