1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 13:39:46 +01:00
home-manager/tests/modules/services/sxhkd/service.nix

32 lines
611 B
Nix
Raw Normal View History

{ config, pkgs, ... }:
let
expectedFileRegex = ''
systemd-cat -t sxhkd systemd-run --user --scope -u sxhkd \
@sxhkd@/bin/sxhkd -m 1 &
'';
in
2019-09-15 23:12:08 +02:00
{
config = {
xsession = {
enable = true;
windowManager.command = "";
};
2019-09-15 23:12:08 +02:00
services.sxhkd = {
enable = true;
package = pkgs.runCommandLocal "dummy-package" { } "mkdir $out" // { outPath = "@sxhkd@"; };
extraOptions = [ "-m 1" ];
2019-09-15 23:12:08 +02:00
};
nmt.script = ''
xsessionFile=home-files/.xsession
2019-09-15 23:12:08 +02:00
assertFileExists $xsessionFile
2019-09-15 23:12:08 +02:00
assertFileRegex $xsessionFile ${expectedFileRegex}
2019-09-15 23:12:08 +02:00
'';
};
}