From 57788ab135d9a0aa0a7320b9cf03de5505f812d8 Mon Sep 17 00:00:00 2001 From: Mike Vink Date: Tue, 29 Nov 2022 11:29:34 +0000 Subject: add shell scripts --- shell-scripts/nix-proxy | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 shell-scripts/nix-proxy (limited to 'shell-scripts') 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 -- cgit v1.2.3