Option for proxy usage in Nix daemon

Signed-off-by: Nicolas Pierron <nicolas.pierron@lrde.epita.fr>

svn path=/nixos/branches/fix-style/; revision=14156
This commit is contained in:
Nicolas Pierron 2009-02-22 16:06:27 +00:00
parent 1c1c1e0b15
commit 95ef8b1694

View File

@ -1933,6 +1933,16 @@ in
on the remote machine. on the remote machine.
"; ";
}; };
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";
};
# Environment variables for running Nix. # Environment variables for running Nix.
envVars = mkOption { envVars = mkOption {
@ -1962,7 +1972,16 @@ in
export NIX_REMOTE_SYSTEMS=/etc/nix.machines export NIX_REMOTE_SYSTEMS=/etc/nix.machines
export NIX_CURRENT_LOAD=/var/run/nix/current-load export NIX_CURRENT_LOAD=/var/run/nix/current-load
'' ''
else "") + conf; 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 "")
+ conf;
}; };
}; };