mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-05 08:17:01 +00:00
skhd: add basic test
This commit is contained in:
parent
0cd791527f
commit
25b2f87b58
2 changed files with 23 additions and 0 deletions
|
@ -98,6 +98,7 @@ let
|
||||||
tests.nixpkgs-overlays = makeTest ./tests/nixpkgs-overlays.nix;
|
tests.nixpkgs-overlays = makeTest ./tests/nixpkgs-overlays.nix;
|
||||||
tests.programs-zsh = makeTest ./tests/programs-zsh.nix;
|
tests.programs-zsh = makeTest ./tests/programs-zsh.nix;
|
||||||
tests.services-activate-system = makeTest ./tests/services-activate-system.nix;
|
tests.services-activate-system = makeTest ./tests/services-activate-system.nix;
|
||||||
|
tests.services-skhd = makeTest ./tests/services-skhd.nix;
|
||||||
tests.system-defaults-write = makeTest ./tests/system-defaults-write.nix;
|
tests.system-defaults-write = makeTest ./tests/system-defaults-write.nix;
|
||||||
tests.system-keyboard-mapping = makeTest ./tests/system-keyboard-mapping.nix;
|
tests.system-keyboard-mapping = makeTest ./tests/system-keyboard-mapping.nix;
|
||||||
tests.system-packages = makeTest ./tests/system-packages.nix;
|
tests.system-packages = makeTest ./tests/system-packages.nix;
|
||||||
|
|
22
tests/services-skhd.nix
Normal file
22
tests/services-skhd.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
skhd = pkgs.runCommand "skhd-0.0.0" {} "mkdir $out";
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
services.skhd.enable = true;
|
||||||
|
services.skhd.package = skhd;
|
||||||
|
services.skhd.skhdConfig = "alt + shift - r : chunkc quit";
|
||||||
|
|
||||||
|
test = ''
|
||||||
|
echo >&2 "checking skhd service in ~/Library/LaunchAgents"
|
||||||
|
grep "org.nixos.skhd" ${config.out}/user/Library/LaunchAgents/org.nixos.skhd.plist
|
||||||
|
grep "${skhd}/bin/skhd" ${config.out}/user/Library/LaunchAgents/org.nixos.skhd.plist
|
||||||
|
|
||||||
|
echo >&2 "checking config in /etc/skhdrc"
|
||||||
|
grep "alt + shift - r : chunkc quit" ${config.out}/etc/skhdrc
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue