1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-29 09:58:32 +02:00

sxhkd: fix service test

Before it generated a nonsense test script.
This commit is contained in:
Robert Helgesson 2021-06-17 00:16:17 +02:00
parent 6cd92c643a
commit a01fe9f81e
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89
2 changed files with 12 additions and 16 deletions

View File

@ -72,10 +72,12 @@ in
cfg.extraConfig cfg.extraConfig
]; ];
xsession.initExtra = '' xsession.initExtra =
systemctl --user stop sxhkd.scope 2> /dev/null || true let
systemd-cat -t sxhkd systemd-run --user --scope -u sxhkd \ sxhkdCommand = "${cfg.package}/bin/sxhkd ${toString cfg.extraOptions}";
${cfg.package}/bin/sxhkd ${toString cfg.extraOptions} & in ''
''; systemctl --user stop sxhkd.scope 2> /dev/null || true
systemd-cat -t sxhkd systemd-run --user --scope -u sxhkd ${sxhkdCommand} &
'';
}; };
} }

View File

@ -1,15 +1,5 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let
expectedFileRegex = ''
systemctl --user stop sxhkd.scope 2> /dev/null || true
systemd-cat -t sxhkd systemd-run --user --scope -u sxhkd \
@sxhkd@/bin/sxhkd -m 1 &
'';
in
{ {
config = { config = {
xsession = { xsession = {
@ -28,7 +18,11 @@ in
assertFileExists $xsessionFile assertFileExists $xsessionFile
assertFileRegex $xsessionFile ${expectedFileRegex} assertFileContains $xsessionFile \
'systemctl --user stop sxhkd.scope 2> /dev/null || true'
assertFileContains $xsessionFile \
'systemd-cat -t sxhkd systemd-run --user --scope -u sxhkd @sxhkd@/bin/sxhkd -m 1 &'
''; '';
}; };
} }