mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08: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:
@@ -75,7 +75,7 @@ in {
|
||||
sxhkdCommand = "${cfg.package}/bin/sxhkd ${toString cfg.extraOptions}";
|
||||
in ''
|
||||
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} &
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
'systemctl --user stop sxhkd.scope 2> /dev/null || true'
|
||||
|
||||
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 &'
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user