marleyos/modules/home/programs/xwayland-satellite.nix

39 lines
970 B
Nix

{
config,
lib,
pkgs,
...
}: let
cfg = config.marleyos.programs.xwayland-satellite;
in {
options.marleyos.programs.xwayland-satellite.enable = lib.mkEnableOption "xwayland-satellite";
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
home.packages = with pkgs; [
xwayland-satellite
];
systemd.user.services."xwayland-satellite" = {
Unit = {
Description = "Xwayland outside your Wayland";
BindsTo = ["xdg-desktop-autostart.target"];
PartOf = ["xdg-desktop-autostart.target"];
After = ["xdg-desktop-autostart.target"];
Requisite = ["xdg-desktop-autostart.target"];
};
Service = {
Type = "notify";
NotifyAccess = "all";
ExecStart = lib.getExe pkgs.xwayland-satellite;
StandardOutput = "journal";
};
Install = {
WantedBy = ["xdg-desktop-autostart.target"];
};
};
home.sessionVariables.DISPLAY = ":0";
};
}