1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-15 21:08:21 +00:00
nix-darwin/tests/services-lorri.nix
2020-08-30 18:06:40 +02:00

24 lines
873 B
Nix

{ config, pkgs, ... }:
let
lorri = pkgs.runCommand "lorri-0.0.0" {} "mkdir $out";
plistPath = "${config.out}/user/Library/LaunchAgents/org.nixos.lorri.plist";
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}
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>/bin/sh</string>" ${plistPath}
grep -o "<string>org.nixos.lorri</string>" ${plistPath}
grep -o "<string>-c</string>" ${plistPath}
grep -o "<string>exec ${pkgs.lorri}/bin/lorri daemon</string>" ${plistPath}
'';
}