mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-11-22 01:12:19 +00:00
enable systemd fixes
This commit is contained in:
parent
6d4bfdb7b3
commit
f54e3593a0
2 changed files with 18 additions and 24 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./binds.nix
|
./binds.nix
|
||||||
# ./systemd-fixes.nix
|
./systemd-fixes.nix
|
||||||
./tty-init.nix
|
./tty-init.nix
|
||||||
../wayland-wm
|
../wayland-wm
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,27 +1,21 @@
|
||||||
{ lib, config, ... }:
|
{ lib, config, ... }: {
|
||||||
let
|
# stolen from https://github.com/alebastr/sway-systemd/commit/0fdb2c4b10beb6079acd6073c5b3014bd58d3b74
|
||||||
cfg = config.wayland.windowManager.hyprland;
|
systemd.user.targets.hyprland-session-shutdown = {
|
||||||
in
|
Unit = {
|
||||||
{
|
Description = "Shutdown running Hyprland session";
|
||||||
config = lib.mkIf (cfg.enable && cfg.systemdIntegration) {
|
DefaultDependencies = "no";
|
||||||
# stolen from https://github.com/alebastr/sway-systemd/commit/0fdb2c4b10beb6079acd6073c5b3014bd58d3b74
|
StopWhenUnneeded = "true";
|
||||||
systemd.user.targets.hyprland-session-shutdown = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Shutdown running Hyprland session";
|
|
||||||
DefaultDependencies = "no";
|
|
||||||
StopWhenUnneeded = "true";
|
|
||||||
|
|
||||||
Conflicts = [
|
Conflicts = [
|
||||||
"graphical-session.target"
|
"graphical-session.target"
|
||||||
"graphical-session-pre.target"
|
"graphical-session-pre.target"
|
||||||
"hyprland-session.target"
|
"hyprland-session.target"
|
||||||
];
|
];
|
||||||
After = [
|
After = [
|
||||||
"graphical-session.target"
|
"graphical-session.target"
|
||||||
"graphical-session-pre.target"
|
"graphical-session-pre.target"
|
||||||
"hyprland-session.target"
|
"hyprland-session.target"
|
||||||
];
|
];
|
||||||
};
|
|
||||||
};
|
};
|
||||||
wayland.windowManager.hyprland.settings.bind = lib.mkAfter [
|
wayland.windowManager.hyprland.settings.bind = lib.mkAfter [
|
||||||
"SUPERSHIFT,e,exec,systemctl --user start hyprland-session-shutdown.target; hyprctl dispatch exit"
|
"SUPERSHIFT,e,exec,systemctl --user start hyprland-session-shutdown.target; hyprctl dispatch exit"
|
||||||
|
|
Loading…
Reference in a new issue