nix-dotfiles/modules/desktop/xwayland-satellite.nix
2025-05-18 23:05:26 -07:00

35 lines
884 B
Nix

{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.desktop.xwayland-satellite;
in {
options.modules.desktop.xwayland-satellite = {
enable = mkEnableOption "Enable xwayland-satellite, xwayland outside your wayland";
package = mkOption {
type = types.package;
default = pkgs.xwayland-satellite-unstable;
};
};
config = mkIf cfg.enable {
hm.systemd.user.services.xwayland-satellite = {
Unit = {
Description = "xwayland-satellite, xwayland outside your wayland";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = "${lib.getExe cfg.package}";
Restart = "on-failure";
RestartSec = 5;
};
};
};
}