1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-17 16:49:45 +01:00
home-manager/tests/modules/services/sxhkd/service.nix
Robert Helgesson a01fe9f81e
sxhkd: fix service test
Before it generated a nonsense test script.
2021-06-17 00:16:17 +02:00

28 lines
657 B
Nix

{ config, pkgs, ... }:
{
config = {
xsession = {
enable = true;
windowManager.command = "";
};
services.sxhkd = {
enable = true;
package = pkgs.runCommandLocal "dummy-package" { } "mkdir $out" // { 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 -u sxhkd @sxhkd@/bin/sxhkd -m 1 &'
'';
};
}