mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 19:51:17 +00:00
docker: pass all proxy variables to docker daemon
This makes things as noProxy work too.
This commit is contained in:
parent
fce59d47e7
commit
846f36203c
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue