fork/home-manager

git clone https://git.julia.blue/fork/home-manager

midchildansyncthing: add Darwin support885a504f

master
749 B26 linesraw
1{ lib, pkgs, ... }:
2
3lib.mkMerge [
4  {
5    services.syncthing = {
6      enable = true;
7      extraOptions = [ "-foo" ''-bar "baz"'' ];
8    };
9
10    test.stubs.syncthing = { };
11  }
12  (lib.mkIf pkgs.stdenv.isLinux {
13    nmt.script = ''
14      assertFileExists home-files/.config/systemd/user/syncthing.service
15      assertFileContains home-files/.config/systemd/user/syncthing.service \
16      "ExecStart='@syncthing@/bin/syncthing' '-no-browser' '-no-restart' '-logflags=0' '-foo' '-bar \"baz\"'"
17    '';
18  })
19  (lib.mkIf pkgs.stdenv.isDarwin {
20    nmt.script = ''
21      serviceFile=LaunchAgents/org.nix-community.home.syncthing.plist
22      assertFileExists "$serviceFile"
23      assertFileContent "$serviceFile" ${./expected-agent.plist}
24    '';
25  })
26]