mirror of
https://github.com/nix-community/home-manager
synced 2024-09-11 22:06:31 +02:00
This makes it consistent with some other options, like `systemd.user.services.Service.ExecStart`.
43 lines
736 B
Nix
43 lines
736 B
Nix
{ config, pkgs, ... }:
|
|
|
|
let
|
|
script = pkgs.writeShellScript "script.sh" ''
|
|
echo "test"
|
|
'';
|
|
in {
|
|
services.sxhkd = {
|
|
enable = true;
|
|
|
|
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;
|
|
};
|
|
|
|
extraConfig = ''
|
|
super + c
|
|
call command c
|
|
|
|
# comment
|
|
super + d
|
|
call command d
|
|
'';
|
|
};
|
|
|
|
nmt.script = ''
|
|
sxhkdrc=home-files/.config/sxhkd/sxhkdrc
|
|
|
|
assertFileExists $sxhkdrc
|
|
|
|
assertFileContent $sxhkdrc ${
|
|
pkgs.substituteAll {
|
|
src = ./sxhkdrc;
|
|
inherit script;
|
|
}
|
|
}
|
|
'';
|
|
}
|