xwayland satellite service

This commit is contained in:
twoneis 2024-07-21 04:23:50 +02:00
parent 21739b152d
commit bcd1979166
2 changed files with 63 additions and 40 deletions

View file

@ -1,4 +1,9 @@
{ inputs, lib, config, pkgs, ... }: lib.mkIf config.withNiri { { inputs, lib, config, pkgs, ... }: {
imports = [
./xwl-satellite.service.nix
];
config = lib.mkIf config.withNiri {
nixpkgs.overlays = [ inputs.niri.overlays.niri ]; nixpkgs.overlays = [ inputs.niri.overlays.niri ];
programs.niri = { programs.niri = {
@ -10,8 +15,6 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
brightnessctl brightnessctl
swaybg swaybg
xwayland-satellite
xwayland
]; ];
programs.niri = { programs.niri = {
@ -48,4 +51,5 @@
settings = import ./swaylock.conf.nix { lib = lib; config = config; }; settings = import ./swaylock.conf.nix { lib = lib; config = config; };
}; };
}; };
};
} }

View file

@ -0,0 +1,19 @@
{ lib, config, pkgs, ... }: lib.mkIf config.withNiri {
environment.systemPackages = with pkgs; [ xwayland-satellite xwayland ];
systemd.services.xwayland-satellite = {
description = "Xwayland outside your Wayland";
wantedBy = [ "graphical-session.target" ];
bindsTo = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
requisite = [ "graphical-session.target" ];
serviceConfig = {
Type = "notify";
NotifyAccess = "all";
ExecStart = "/${pkgs.xwayland-satellite}/bin/xwayland-satellite";
StandardOutput = "journal";
};
};
}