1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-14 20:56:37 +00:00
nix-darwin/tests/services-lorri.nix

25 lines
873 B
Nix
Raw Normal View History

2020-05-12 19:20:29 +02:00
{ config, pkgs, ... }:
let
lorri = pkgs.runCommand "lorri-0.0.0" {} "mkdir $out";
plistPath = "${config.out}/user/Library/LaunchAgents/org.nixos.lorri.plist";
2020-05-12 19:20:29 +02:00
in
{
services.lorri.enable = true;
test = ''
echo checking lorri service in /Library/LaunchAgents >&2
grep -o "<key>NIX_PATH</key>" ${plistPath}
grep -o "<key>EnvironmentVariables</key>" ${plistPath}
grep -o "<string>nixpkgs=" ${plistPath}
2020-05-12 19:20:29 +02:00
grep -o "<key>KeepAlive</key>" ${plistPath}
2020-08-29 16:32:49 +02:00
grep -o "<key>RunAtLoad</key>" ${plistPath}
grep -o "<key>ProcessType</key>" ${plistPath}
grep -o "<string>Background</string>" ${plistPath}
grep -o "<string>/bin/sh</string>" ${plistPath}
grep -o "<string>org.nixos.lorri</string>" ${plistPath}
2020-08-29 16:32:49 +02:00
grep -o "<string>-c</string>" ${plistPath}
grep -o "<string>exec ${pkgs.lorri}/bin/lorri daemon</string>" ${plistPath}
2020-05-12 19:20:29 +02:00
'';
}