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-lorri.nix

23 lines
778 B
Nix
Raw Normal View History

2020-05-12 17:20:29 +00:00
{ config, pkgs, ... }:
let
nix = pkgs.runCommand "nix-0.0.0" { version = "1.11.6"; } "mkdir -p $out";
2020-08-29 14:32:49 +00:00
plistPath = "${config.out}/user/Library/LaunchAgents/com.target.lorri.plist";
2020-05-12 17:20:29 +00:00
in
{
services.lorri.enable = true;
2020-08-29 14:32:49 +00:00
nix.package = pkgs.nix;
2020-05-12 17:20:29 +00:00
test = ''
echo checking lorri service in /Library/LaunchAgents >&2
grep -o "<key>KeepAlive</key>" ${plistPath}
2020-08-29 14:32:49 +00:00
grep -o "<key>RunAtLoad</key>" ${plistPath}
grep -o "<key>ProcessType</key>" ${plistPath}
grep -o "<string>Background</string>" ${plistPath}
grep -o "<string>com.target.lorri</string>" ${plistPath}
grep -o "<string>${pkgs.zsh}/bin/zsh</string>" ${plistPath}
grep -o "<string>-c</string>" ${plistPath}
grep -o "<string>${pkgs.lorri}/bin/lorri daemon</string>" ${plistPath}
2020-05-12 17:20:29 +00:00
'';
}