mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 02:39:48 +01: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
|
||||
];
|
||||
|
||||
xsession.initExtra = ''
|
||||
systemctl --user stop sxhkd.scope 2> /dev/null || true
|
||||
systemd-cat -t sxhkd systemd-run --user --scope -u sxhkd \
|
||||
${cfg.package}/bin/sxhkd ${toString cfg.extraOptions} &
|
||||
'';
|
||||
xsession.initExtra =
|
||||
let
|
||||
sxhkdCommand = "${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} &
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
{ 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 = {
|
||||
xsession = {
|
||||
|
@ -28,7 +18,11 @@ in
|
|||
|
||||
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