mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-01-11 20:40:24 +01:00
feat: install some apps from apple store instead of homebrew
feat: replace username with ryan fix: secrets
This commit is contained in:
@@ -12,7 +12,8 @@ from pathlib import Path
|
||||
NIX_DAEMON_PLIST = Path("/Library/LaunchDaemons/org.nixos.nix-daemon.plist")
|
||||
NIX_DAEMON_NAME = "org.nixos.nix-daemon"
|
||||
# http proxy provided by clash
|
||||
HTTP_PROXY = "http://127.0.0.1:7890"
|
||||
# HTTP_PROXY = "http://127.0.0.1:7890"
|
||||
HTTP_PROXY = "http://192.168.5.201:7890"
|
||||
|
||||
pl = plistlib.loads(NIX_DAEMON_PLIST.read_bytes())
|
||||
|
||||
@@ -20,6 +21,15 @@ pl = plistlib.loads(NIX_DAEMON_PLIST.read_bytes())
|
||||
pl["EnvironmentVariables"]["HTTP_PROXY"] = HTTP_PROXY
|
||||
pl["EnvironmentVariables"]["HTTPS_PROXY"] = HTTP_PROXY
|
||||
|
||||
# Homebrew Mirror
|
||||
pl["EnvironmentVariables"].update({
|
||||
"HOMEBREW_API_DOMAIN": "https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api",
|
||||
"HOMEBREW_BOTTLE_DOMAIN": "https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles",
|
||||
"HOMEBREW_BREW_GIT_REMOTE": "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git",
|
||||
"HOMEBREW_CORE_GIT_REMOTE": "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git",
|
||||
"HOMEBREW_PIP_INDEX_URL": "https://pypi.tuna.tsinghua.edu.cn/simple",
|
||||
})
|
||||
|
||||
os.chmod(NIX_DAEMON_PLIST, 0o644)
|
||||
NIX_DAEMON_PLIST.write_bytes(plistlib.dumps(pl))
|
||||
os.chmod(NIX_DAEMON_PLIST, 0o444)
|
||||
|
||||
Reference in New Issue
Block a user