From 47e98fda704ff26203af95563c31bb17891f025b Mon Sep 17 00:00:00 2001 From: Myned Date: Tue, 24 Dec 2024 10:25:31 -0500 Subject: [PATCH] xwayland-satellite: fix variable for user environment Signed-off-by: Myned --- options/custom/services/xwayland-satellite.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/options/custom/services/xwayland-satellite.nix b/options/custom/services/xwayland-satellite.nix index 3dab7e7..0bc816f 100644 --- a/options/custom/services/xwayland-satellite.nix +++ b/options/custom/services/xwayland-satellite.nix @@ -9,7 +9,10 @@ with lib; let cfg = config.custom.services.xwayland-satellite; in { - options.custom.services.xwayland-satellite.enable = mkOption {default = false;}; + options.custom.services.xwayland-satellite = { + enable = mkOption {default = false;}; + display = mkOption {default = ":${toString config.services.xserver.display}";}; + }; config = mkIf cfg.enable { # HACK: Use official module if added @@ -41,7 +44,13 @@ in { }; environment.sessionVariables = { - DISPLAY = ":0"; # Assume first display + DISPLAY = cfg.display; + }; + + home-manager.users.${config.custom.username} = { + home.sessionVariables = { + DISPLAY = cfg.display; + }; }; }; }