diff --git a/users/guanranwang/darwin/presets/core/proxy.nix b/users/guanranwang/darwin/presets/core/proxy.nix index c170bd1..a84f276 100644 --- a/users/guanranwang/darwin/presets/core/proxy.nix +++ b/users/guanranwang/darwin/presets/core/proxy.nix @@ -2,20 +2,7 @@ inputs, pkgs, ... -}: -# README!!: -# I HAVE NO IDEA HOW LAUNCHD DAEMON WORKS -# USE AT YOUR OWN RISK -# it just works™ -# -# Remember to manually copy `config.yaml` to `/etc/clash-meta` -# I have no idea how to get sops-nix working on darwin... -# -{ - launchd.daemons."clash-meta" = { - command = "${pkgs.clash-meta}/bin/clash-meta -d /etc/clash-meta"; - }; - +}: { environment.variables = { "http_proxy" = "http://127.0.0.1:7890"; "https_proxy" = "http://127.0.0.1:7890"; @@ -23,5 +10,16 @@ "rsync_proxy" = "http://127.0.0.1:7890"; }; + launchd.daemons."nix-daemon".environment = { + "http_proxy" = "http://127.0.0.1:7890"; + "https_proxy" = "http://127.0.0.1:7890"; + "ftp_proxy" = "http://127.0.0.1:7890"; + "rsync_proxy" = "http://127.0.0.1:7890"; + }; + + launchd.daemons."clash-meta" = { + command = "${pkgs.clash-meta}/bin/clash-meta -d /etc/clash-meta"; + }; + environment.etc."clash-meta/metacubexd".source = inputs.metacubexd; }