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:
parent
1c1c1e0b15
commit
95ef8b1694
@ -1934,6 +1934,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";
|
||||||
|
};
|
||||||
|
|
||||||
# Environment variables for running Nix.
|
# Environment variables for running Nix.
|
||||||
envVars = mkOption {
|
envVars = mkOption {
|
||||||
internal = true;
|
internal = true;
|
||||||
@ -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;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user