Option for proxy usage in Nix daemon

svn path=/nixos/trunk/; revision=13689
This commit is contained in:
Michael Raskin 2009-01-03 09:07:52 +00:00
parent d8c1734b99
commit 32adf2c521
2 changed files with 19 additions and 1 deletions

@ -2682,6 +2682,16 @@ in
";
};
proxy = mkOption {
default = "";
description = "
This option specifies the proxy to use for fetchurl. The real effect
is just exporting http_proxy, https_proxy and ftp_proxy with that
value.
";
example = "http://127.0.0.1:3128";
};
};

@ -103,7 +103,15 @@ rec {
export NIX_REMOTE_SYSTEMS=/etc/nix.machines
export NIX_CURRENT_LOAD=/var/run/nix/current-load
''
else "");
else "")
+
(if config.nix.proxy != "" then
''
export http_proxy=${config.nix.proxy}
export https_proxy=${config.nix.proxy}
export ftp_proxy=${config.nix.proxy}
'' else "")
;
# The services (Upstart) configuration for the system.