home/programs/niri: turn xwayland-satellite into systemd service

This commit is contained in:
Anthony Rodriguez 2024-10-08 13:41:55 +02:00
parent 25696b09f1
commit 786cdbf979
Signed by: nezia
GPG key ID: EE3BE97C040A86CE

View file

@ -1,5 +1,7 @@
{ {
inputs, inputs,
lib,
pkgs,
nixosConfig, nixosConfig,
... ...
}: let }: let
@ -51,7 +53,25 @@ in {
center-focused-column = "always"; center-focused-column = "always";
always-center-single-column = true; always-center-single-column = true;
}; };
spawn-at-startup = [{command = ["xwayland-satellite"];}]; };
};
# copied from https://github.com/linyinfeng/dotfiles/blob/c00fe3b1562ad947672863a43e455bc2f01a56b6/home-manager/profiles/niri/default.nix#L594-L611
systemd.user.services.xwayland-satellite = {
Unit = {
PartOf = ["graphical-session.target"];
After = ["graphical-session.target"];
Requisite = ["graphical-session.target"];
};
Install = {
WantedBy = ["niri.service"];
};
Service = {
Type = "simple";
ExecStart = "${lib.getExe pkgs.xwayland-satellite} :0";
NotifyAccess = "all";
StandardOutput = "journal";
Restart = "on-failure";
}; };
}; };
} }