mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
Option for proxy usage in Nix daemon
svn path=/nixos/trunk/; revision=13689
This commit is contained in:
parent
d8c1734b99
commit
32adf2c521
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user