1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00
nix-darwin/tests/services-jankyborders.nix

30 lines
980 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
with lib;
let
jankyborders = pkgs.runCommand "borders-0.0.0" {} "mkdir $out";
in
{
services.jankyborders.enable = true;
services.jankyborders.package = jankyborders;
services.jankyborders.width = 5.0;
services.jankyborders.hidpi = true;
services.jankyborders.active_color = "0xFFFFFFFF";
test = ''
echo >&2 "checking jankyborders service in ~/Library/LaunchAgents"
grep "org.nixos.jankyborders" ${config.out}/user/Library/LaunchAgents/org.nixos.jankyborders.plist
grep "${jankyborders}/bin/borders" ${config.out}/user/Library/LaunchAgents/org.nixos.jankyborders.plist
echo >&2 "checking jankyborders config arguments"
grep "width=5.000000" ${config.out}/user/Library/LaunchAgents/org.nixos.jankyborders.plist
grep "hidpi=on" ${config.out}/user/Library/LaunchAgents/org.nixos.jankyborders.plist
grep "active_color=0xFFFFFFFF" ${config.out}/user/Library/LaunchAgents/org.nixos.jankyborders.plist
'';
}