docker: pass all proxy variables to docker daemon

This makes things as noProxy work too.
This commit is contained in:
Pascal Bach 2017-04-26 16:55:36 +02:00
parent fce59d47e7
commit 846f36203c

View file

@ -7,8 +7,7 @@ with lib;
let
cfg = config.virtualisation.docker;
pro = config.networking.proxy.default;
proxy_env = optionalAttrs (pro != null) { Environment = "\"http_proxy=${pro}\""; };
proxy_env = config.networking.proxy.envVars;
in
@ -106,6 +105,7 @@ in
systemd.services.docker = {
wantedBy = optional cfg.enableOnBoot "multi-user.target";
environment = proxy_env;
serviceConfig = {
ExecStart = [
""
@ -122,7 +122,7 @@ in
""
"${pkgs.procps}/bin/kill -s HUP $MAINPID"
];
} // proxy_env;
};
path = [ pkgs.kmod ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs);
};