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
Thibault Gagnaux 30593350fd Makes it work.
2020-08-29 16:35:43 +02:00

22 lines
778 B
Nix

{ config, pkgs, ... }:
let
nix = pkgs.runCommand "nix-0.0.0" { version = "1.11.6"; } "mkdir -p $out";
plistPath = "${config.out}/user/Library/LaunchAgents/com.target.lorri.plist";
in
{
services.lorri.enable = true;
nix.package = pkgs.nix;
test = ''
echo checking lorri service in /Library/LaunchAgents >&2
grep -o "<key>KeepAlive</key>" ${plistPath}
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}
'';
}