1
1
Fork 0

xwayland-satellite: initial module

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2024-12-23 13:02:46 -05:00
parent 77598282a9
commit c7252afcee
Signed by: myned
GPG key ID: C7224454F7881A34

View file

@ -0,0 +1,47 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
xwayland-satellite = "${pkgs.xwayland-satellite}/bin/xwayland-satellite";
cfg = config.custom.services.xwayland-satellite;
in {
options.custom.services.xwayland-satellite.enable = mkOption {default = false;};
config = mkIf cfg.enable {
# HACK: Use official module if added
# BUG: Fractional scaling is currently not supported
# https://github.com/Supreeeme/xwayland-satellite/issues/11
# Rootless Xwayland support as a user service
# https://github.com/Supreeeme/xwayland-satellite
# https://github.com/Supreeeme/xwayland-satellite/blob/main/resources/xwayland-satellite.service
systemd.user.services.xwayland-satellite = {
enable = true;
unitConfig = {
Description = "Xwayland outside your Wayland";
BindsTo = ["graphical-session.target"];
PartOf = ["graphical-session.target"];
After = ["graphical-session.target"];
Requisite = ["graphical-session.target"];
};
serviceConfig = {
Type = "notify";
NotifyAccess = "all";
ExecStart = xwayland-satellite;
StandardOutput = "journal";
};
wantedBy = ["graphical-session.target"];
};
environment.sessionVariables = {
DISPLAY = ":0"; # Assume first display
};
};
}