mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 08:30:41 +00:00
sxhkd: fix service test
Before it generated a nonsense test script.
This commit is contained in:
parent
6cd92c643a
commit
a01fe9f81e
2 changed files with 12 additions and 16 deletions
|
@ -72,10 +72,12 @@ in
|
||||||
cfg.extraConfig
|
cfg.extraConfig
|
||||||
];
|
];
|
||||||
|
|
||||||
xsession.initExtra = ''
|
xsession.initExtra =
|
||||||
|
let
|
||||||
|
sxhkdCommand = "${cfg.package}/bin/sxhkd ${toString cfg.extraOptions}";
|
||||||
|
in ''
|
||||||
systemctl --user stop sxhkd.scope 2> /dev/null || true
|
systemctl --user stop sxhkd.scope 2> /dev/null || true
|
||||||
systemd-cat -t sxhkd systemd-run --user --scope -u sxhkd \
|
systemd-cat -t sxhkd systemd-run --user --scope -u sxhkd ${sxhkdCommand} &
|
||||||
${cfg.package}/bin/sxhkd ${toString cfg.extraOptions} &
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 &'
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue