nixos: clash-meta-client: move setproxy aliaes
This commit is contained in:
parent
fc231ebf75
commit
0dcf6ffd7c
3 changed files with 11 additions and 6 deletions
|
@ -51,11 +51,5 @@
|
|||
home.shellAliases = {
|
||||
".." = "cd ..";
|
||||
"farsee" = "curl -F 'c=@-' 'https://fars.ee/'"; # pb
|
||||
|
||||
# proxy
|
||||
"setproxy" = let
|
||||
proxy = "http://127.0.0.1:7890/";
|
||||
in "export http_proxy=${proxy} https_proxy=${proxy} ftp_proxy=${proxy} rsync_proxy=${proxy}";
|
||||
"unsetproxy" = "set -e http_proxy https_proxy all_proxy";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
inputs,
|
||||
...
|
||||
}: {
|
||||
### home-manager
|
||||
home-manager.users.guanranwang.imports = [./home];
|
||||
|
||||
services.clash = {
|
||||
enable = true;
|
||||
package = pkgs.clash-meta;
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
{osConfig, ...}: let
|
||||
inherit (osConfig.networking) proxy;
|
||||
in {
|
||||
home.shellAliases = {
|
||||
"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";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue