Created
August 21, 2023 14:45
-
-
Save hnaderi/cb373f6393211d5fcfa17597b2f7b562 to your computer and use it in GitHub Desktop.
Set temporary proxy for nix-daemon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
rm /run/systemd/system/nix-daemon.service.d/proxy-override.conf | |
systemctl daemon-reload | |
systemctl restart nix-daemon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
PROXY=$1 | |
mkdir -p /run/systemd/system/nix-daemon.service.d/ | |
cat << EOF >/run/systemd/system/nix-daemon.service.d/proxy-override.conf | |
[Service] | |
Environment="http_proxy=$PROXY" | |
Environment="https_proxy=$PROXY" | |
Environment="all_proxy=$PROXY" | |
EOF | |
systemctl daemon-reload | |
systemctl restart nix-daemon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment