1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-11 12:29:47 +01:00
home-manager/tests/modules/services/sxhkd/configuration.nix

43 lines
736 B
Nix
Raw Normal View History

{ config, pkgs, ... }:
let
script = pkgs.writeShellScript "script.sh" ''
echo "test"
'';
in {
services.sxhkd = {
enable = true;
2019-09-15 23:12:08 +02:00
package = config.lib.test.mkStubPackage { outPath = "@sxhkd@"; };
keybindings = {
"super + a" = "run command a";
"super + b" = null;
"super + Shift + b" = "run command b";
"super + s" = script;
};
2019-09-15 23:12:08 +02:00
extraConfig = ''
super + c
call command c
2019-09-15 23:12:08 +02:00
# comment
super + d
call command d
2019-09-15 23:12:08 +02:00
'';
};
nmt.script = ''
sxhkdrc=home-files/.config/sxhkd/sxhkdrc
assertFileExists $sxhkdrc
assertFileContent $sxhkdrc ${
pkgs.substituteAll {
src = ./sxhkdrc;
inherit script;
}
}
'';
2019-09-15 23:12:08 +02:00
}