mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 00:02:25 +00:00
Set proxy config for daemon during installation on Darwin
Signed-off-by: Zhongcheng Lao <laozhongcheng@gmail.com>
This commit is contained in:
parent
d05d175ddf
commit
3a47e9e53f
@ -102,6 +102,14 @@ poly_configure_nix_daemon_service() {
|
||||
_sudo "to set up the nix-daemon as a LaunchDaemon" \
|
||||
/usr/bin/install -m -rw-r--r-- "/nix/var/nix/profiles/default$NIX_DAEMON_DEST" "$NIX_DAEMON_DEST"
|
||||
|
||||
vars="http_proxy https_proxy ftp_proxy no_proxy HTTP_PROXY HTTPS_PROXY FTP_PROXY NO_PROXY"
|
||||
for v in $vars; do
|
||||
if [ "x${!v:-}" != "x" ]; then
|
||||
_sudo "to set the ${v} setting for nix-daemon" \
|
||||
plutil -replace "EnvironmentVariables.${v}" -string "${!v}" "$NIX_DAEMON_DEST"
|
||||
fi
|
||||
done
|
||||
|
||||
_sudo "to load the LaunchDaemon plist for nix-daemon" \
|
||||
launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user