home-manager/tests/modules/services/sxhkd/service.nix

31 lines
671 B
Nix
Raw Normal View History

{ config, pkgs, ... }:
2019-09-15 21:12:08 +00:00
{
config = {
xsession = {
enable = true;
windowManager.command = "";
};
2019-09-15 21:12:08 +00:00
services.sxhkd = {
enable = true;
2021-07-18 21:34:50 +00:00
package = pkgs.runCommandLocal "dummy-package" { } "mkdir $out" // {
outPath = "@sxhkd@";
};
extraOptions = [ "-m 1" ];
2019-09-15 21:12:08 +00:00
};
nmt.script = ''
xsessionFile=home-files/.xsession
2019-09-15 21:12:08 +00:00
assertFileExists $xsessionFile
2019-09-15 21:12:08 +00:00
assertFileContains $xsessionFile \
'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 &'
2019-09-15 21:12:08 +00:00
'';
};
}