1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-26 03:39:47 +01:00

sxhkd: set scope OOMPolicy to continue

When a process inside the sxhkd scope is OOM killed, if the OOM policy
is set to `stop` then the sxhkd scope itself will exit, terminating
every process launched from the keyboard.

This is undesirable, set it to `continue` instead to keep other
processes running.
This commit is contained in:
Naïm Favier 2023-10-24 17:48:13 +02:00 committed by Mikilio
parent 6da70f2252
commit c0cfd32bf0
No known key found for this signature in database
GPG key ID: 5B2F1A890CF33F3F
2 changed files with 2 additions and 2 deletions

View file

@ -75,7 +75,7 @@ in {
sxhkdCommand = "${cfg.package}/bin/sxhkd ${toString cfg.extraOptions}"; sxhkdCommand = "${cfg.package}/bin/sxhkd ${toString cfg.extraOptions}";
in '' in ''
systemctl --user stop sxhkd.scope 2> /dev/null || true systemctl --user stop sxhkd.scope 2> /dev/null || true
systemd-cat -t sxhkd systemd-run --user --scope -u sxhkd ${sxhkdCommand} & systemd-cat -t sxhkd systemd-run --user --scope --property=OOMPolicy=continue -u sxhkd ${sxhkdCommand} &
''; '';
}; };
} }

View file

@ -21,6 +21,6 @@
'systemctl --user stop sxhkd.scope 2> /dev/null || true' 'systemctl --user stop sxhkd.scope 2> /dev/null || true'
assertFileContains $xsessionFile \ assertFileContains $xsessionFile \
'systemd-cat -t sxhkd systemd-run --user --scope -u sxhkd @sxhkd@/bin/sxhkd -m 1 &' 'systemd-cat -t sxhkd systemd-run --user --scope --property=OOMPolicy=continue -u sxhkd @sxhkd@/bin/sxhkd -m 1 &'
''; '';
} }