summaryrefslogtreecommitdiff
path: root/shell-scripts
diff options
context:
space:
mode:
authorMike Vink <mike1994vink@gmail.com>2022-11-29 11:29:34 +0000
committerMike Vink <mike1994vink@gmail.com>2022-11-29 11:29:34 +0000
commit57788ab135d9a0aa0a7320b9cf03de5505f812d8 (patch)
tree10fefd7962ec0077e1ea9544b7f5f74922b8548b /shell-scripts
parent066408ccd8b5079b52d54bb0c99aeb12771cde06 (diff)
add shell scripts
Diffstat (limited to 'shell-scripts')
-rw-r--r--shell-scripts/nix-proxy14
1 files changed, 14 insertions, 0 deletions
diff --git a/shell-scripts/nix-proxy b/shell-scripts/nix-proxy
new file mode 100644
index 0000000..f0b4ada
--- /dev/null
+++ b/shell-scripts/nix-proxy
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+if [[ $(id -u) -ne 0 ]]; then
+ echo "Should be run with sudo privileges"
+ exit
+fi
+mkdir /run/systemd/system/nix-daemon.service.d/
+cat << EOF >/run/systemd/system/nix-daemon.service.d/override.conf
+[Service]
+Environment="http_proxy=$http_proxy"
+Environment="https_proxy=$http_proxy"
+Environment="all_proxy=$http_proxy"
+EOF
+systemctl daemon-reload
+systemctl restart nix-daemon