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
0qq ff959fd49a
sxhkd: fix environment (#1892)
* sxhkd: move to xsession.initExtra

When sxhkd is launched as systemd service it
doesn't have $PATH a user expects to see.

* sxhkd: add news entry
2021-05-07 15:28:52 -04:00

31 lines
611 B
Nix

{ config, pkgs, ... }:
let
expectedFileRegex = ''
systemd-cat -t sxhkd systemd-run --user --scope -u sxhkd \
@sxhkd@/bin/sxhkd -m 1 &
'';
in
{
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
assertFileRegex $xsessionFile ${expectedFileRegex}
'';
};
}