mirror of
https://github.com/nix-community/home-manager
synced 2024-12-23 03:23:30 +00:00
14b5415720
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.
26 lines
608 B
Nix
26 lines
608 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
xsession = {
|
|
enable = true;
|
|
windowManager.command = "";
|
|
};
|
|
|
|
services.sxhkd = {
|
|
enable = true;
|
|
package = config.lib.test.mkStubPackage { outPath = "@sxhkd@"; };
|
|
extraOptions = [ "-m 1" ];
|
|
};
|
|
|
|
nmt.script = ''
|
|
xsessionFile=home-files/.xsession
|
|
|
|
assertFileExists $xsessionFile
|
|
|
|
assertFileContains $xsessionFile \
|
|
'systemctl --user stop sxhkd.scope 2> /dev/null || true'
|
|
|
|
assertFileContains $xsessionFile \
|
|
'systemd-cat -t sxhkd systemd-run --user --scope --property=OOMPolicy=continue -u sxhkd @sxhkd@/bin/sxhkd -m 1 &'
|
|
'';
|
|
}
|