From 365c35cb8dd5e4f2a601610d73de36304c332453 Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Sat, 24 Aug 2024 16:58:06 +0800 Subject: [PATCH] fixup! nixos: mihomo -> sing-box --- nixos/profiles/sing-box/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/nixos/profiles/sing-box/default.nix b/nixos/profiles/sing-box/default.nix index 10f6fd5..2f72ed2 100644 --- a/nixos/profiles/sing-box/default.nix +++ b/nixos/profiles/sing-box/default.nix @@ -6,6 +6,10 @@ services.sing-box = { enable = true; settings = { + log = { + level = "info"; + }; + inbounds = [ { type = "http"; @@ -67,12 +71,15 @@ }; ### System proxy settings - networking.proxy.default = "http://127.0.0.1:1080/"; + networking.proxy = { + httpProxy = "http://127.0.0.1:1080/"; + httpsProxy = "http://127.0.0.1:1080/"; + }; environment.shellAliases = let - inherit (config.networking) proxy; + inherit (config.networking.proxy) httpProxy httpsProxy; in { - "setproxy" = "export http_proxy=${proxy.httpProxy} https_proxy=${proxy.httpsProxy} all_proxy=${proxy.allProxy} ftp_proxy=${proxy.ftpProxy} rsync_proxy=${proxy.rsyncProxy}"; - "unsetproxy" = "set -e http_proxy https_proxy all_proxy ftp_proxy rsync_proxy"; + "setproxy" = "export http_proxy=${httpProxy} https_proxy=${httpsProxy}"; + "unsetproxy" = "set -e http_proxy https_proxy"; }; ### sops-nix