mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
23 lines
718 B
Nix
23 lines
718 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
privoxy = pkgs.runCommand "privoxy-0.0.0" {} "mkdir $out";
|
|
in
|
|
|
|
{
|
|
services.privoxy.enable = true;
|
|
services.privoxy.package = privoxy;
|
|
services.privoxy.config = "forward / .";
|
|
|
|
test = ''
|
|
echo >&2 "checking privoxy service in ~/Library/LaunchAgents"
|
|
grep "org.nixos.privoxy" ${config.out}/user/Library/LaunchAgents/org.nixos.privoxy.plist
|
|
echo grep "${privoxy}/bin/privoxy" ${config.out}/user/Library/LaunchAgents/org.nixos.privoxy.plist
|
|
grep "${privoxy}/bin/privoxy" ${config.out}/user/Library/LaunchAgents/org.nixos.privoxy.plist
|
|
|
|
echo >&2 "checking config in /etc/privoxy-config"
|
|
grep "forward / ." ${config.out}/etc/privoxy-config
|
|
'';
|
|
}
|