1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-17 00:29:45 +01:00
home-manager/tests/modules/services/sxhkd/service.nix
2021-01-16 10:57:32 +01:00

22 lines
605 B
Nix

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