dotfiles/home/features/desktop/hyprland/systemd-fixes.nix

25 lines
781 B
Nix
Raw Normal View History

2023-10-01 19:19:43 +00:00
{ lib, config, ... }: {
# stolen from https://github.com/alebastr/sway-systemd/commit/0fdb2c4b10beb6079acd6073c5b3014bd58d3b74
systemd.user.targets.hyprland-session-shutdown = {
Unit = {
Description = "Shutdown running Hyprland session";
DefaultDependencies = "no";
StopWhenUnneeded = "true";
2023-10-01 19:17:04 +00:00
2023-10-01 19:19:43 +00:00
Conflicts = [
"graphical-session.target"
"graphical-session-pre.target"
"hyprland-session.target"
];
After = [
"graphical-session.target"
"graphical-session-pre.target"
"hyprland-session.target"
];
2023-10-01 19:17:04 +00:00
};
wayland.windowManager.hyprland.settings.bind = lib.mkAfter [
"SUPERSHIFT,e,exec,systemctl --user start hyprland-session-shutdown.target; hyprctl dispatch exit"
];
};
}