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

23 lines
605 B
Nix
Raw Normal View History

{ config, pkgs, ... }:
2019-09-15 21:12:08 +00:00
{
config = {
services.sxhkd = {
enable = true;
package = pkgs.runCommandLocal "dummy-package" { } "mkdir $out" // { outPath = "@sxhkd@"; };
extraOptions = [ "-m 1" ];
2019-09-15 21:12:08 +00:00
extraPath = "/home/the-user/bin:/extra/path/bin";
};
nmt.script = ''
2020-04-09 22:25:21 +00:00
serviceFile=home-files/.config/systemd/user/sxhkd.service
2019-09-15 21:12:08 +00:00
assertFileExists $serviceFile
assertFileRegex $serviceFile 'ExecStart=@sxhkd@/bin/sxhkd -m 1'
2019-09-15 21:12:08 +00:00
assertFileRegex $serviceFile \
'Environment=PATH=.*\.nix-profile/bin:/home/the-user/bin:/extra/path/bin'
'';
};
}