add configs for settings using sudo without password

This commit is contained in:
Baipyrus 2024-11-07 20:00:23 +01:00
parent 9370ff1bc1
commit 36aef5e0d3
4 changed files with 129 additions and 0 deletions

35
configs/wsl_sudo_env.json Normal file
View File

@ -0,0 +1,35 @@
{
"name": "WSL - Sudo - Env",
"cmd": "wsl sudo",
"set": [
{
"args": [
"tee",
"-a",
"/etc/environment",
"\"<<<\"",
"http_proxy"
],
"equator": "="
}, {
"args": [
"tee",
"-a",
"/etc/environment",
"\"<<<\"",
"https_proxy"
],
"equator": "="
}
],
"unset": [
{
"args": [
"sed",
"-i",
"'''/^https\\?_proxy=.*$/d'''",
"/etc/environment"
]
}
]
}

36
configs/wsl_sudo_git.json Normal file
View File

@ -0,0 +1,36 @@
{
"name": "WSL - Sudo - Git",
"cmd": "wsl sudo git",
"set": [
{
"args": [
"config",
"--global",
"http.proxy"
]
}, {
"args": [
"config",
"--global",
"https.proxy"
]
}
],
"unset": [
{
"args": [
"config",
"--global",
"--unset",
"http.proxy"
]
}, {
"args": [
"config",
"--global",
"--unset",
"https.proxy"
]
}
]
}

36
configs/wsl_sudo_npm.json Normal file
View File

@ -0,0 +1,36 @@
{
"name": "WSL - Sudo - NPM",
"cmd": "wsl sudo npm",
"set": [
{
"args": [
"config",
"set",
"proxy"
],
"equator": "="
}, {
"args": [
"config",
"set",
"https-proxy"
],
"equator": "="
}
],
"unset": [
{
"args": [
"config",
"delete",
"proxy"
]
}, {
"args": [
"config",
"delete",
"https-proxy"
]
}
]
}

22
configs/wsl_sudo_pip.json Normal file
View File

@ -0,0 +1,22 @@
{
"name": "WSL - Sudo - Pip",
"cmd": "wsl sudo pip",
"set": [
{
"args": [
"config",
"set",
"global.proxy"
]
}
],
"unset": [
{
"args": [
"config",
"unset",
"global.proxy"
]
}
]
}