mirror of
https://github.com/nix-community/home-manager
synced 2024-11-01 08:49:44 +01:00
cb09a968e9
This option provides a more convenient way to overlay dummy packages. It also adds a function `config.lib.test.mkStubPackage` that can, e.g., be used for `package` options.
26 lines
578 B
Nix
26 lines
578 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
xsession = {
|
|
enable = true;
|
|
windowManager.command = "";
|
|
};
|
|
|
|
services.sxhkd = {
|
|
enable = true;
|
|
package = config.lib.test.mkStubPackage { outPath = "@sxhkd@"; };
|
|
extraOptions = [ "-m 1" ];
|
|
};
|
|
|
|
nmt.script = ''
|
|
xsessionFile=home-files/.xsession
|
|
|
|
assertFileExists $xsessionFile
|
|
|
|
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 &'
|
|
'';
|
|
}
|