mirror of
https://github.com/nix-community/home-manager
synced 2024-11-18 00:59:44 +01:00
44d1a8542a
This makes it consistent with some other options, like `systemd.user.services.Service.ExecStart`.
42 lines
736 B
Nix
42 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;
|
|
}
|
|
}
|
|
'';
|
|
}
|