1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-30 18:38:31 +02:00
home-manager/tests/modules/services/sxhkd/service.nix
2021-01-16 10:57:32 +01:00

23 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'
'';
};
}