summaryrefslogtreecommitdiffstats
path: root/tests/services-synapse-bt.nix
blob: 2f024c2f1943cad362793e94f68082d14632a2ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ config, lib, pkgs, ... }:

with lib;

let
  synapse-bt = pkgs.runCommand "synapse-bt-0.0.0" {} "mkdir $out";
in

{
  system.primaryUser = "test-synapse-bt-user";

  services.synapse-bt.enable = true;
  services.synapse-bt.package = synapse-bt;

  test = ''
    echo >&2 "checking synapse-bt service in ~/Library/LaunchAgents"
    grep "org.nixos.synapse-bt" ${config.out}/user/Library/LaunchAgents/org.nixos.synapse-bt.plist
    grep "${synapse-bt}/bin/synapse" ${config.out}/user/Library/LaunchAgents/org.nixos.synapse-bt.plist
  '';
}