diff options
author | Pascal Bach <pascal.bach@nextrem.ch> | 2017-04-26 16:55:36 +0200 |
---|---|---|
committer | Pascal Bach <pascal.bach@nextrem.ch> | 2017-04-26 16:55:36 +0200 |
commit | 846f36203c99090c3f455dcf07aba64825f7c4b8 (patch) | |
tree | 9e8827a0b01d73874d22c01be26af76a9a2cb8c5 /nixos/modules/virtualisation | |
parent | fce59d47e7d62c68063e3a972e10f4cbe0782431 (diff) | |
download | nixlib-846f36203c99090c3f455dcf07aba64825f7c4b8.tar nixlib-846f36203c99090c3f455dcf07aba64825f7c4b8.tar.gz nixlib-846f36203c99090c3f455dcf07aba64825f7c4b8.tar.bz2 nixlib-846f36203c99090c3f455dcf07aba64825f7c4b8.tar.lz nixlib-846f36203c99090c3f455dcf07aba64825f7c4b8.tar.xz nixlib-846f36203c99090c3f455dcf07aba64825f7c4b8.tar.zst nixlib-846f36203c99090c3f455dcf07aba64825f7c4b8.zip |
docker: pass all proxy variables to docker daemon
This makes things as noProxy work too.
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r-- | nixos/modules/virtualisation/docker.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix index f1101d7ea66e..c26cae06cd1d 100644 --- a/nixos/modules/virtualisation/docker.nix +++ b/nixos/modules/virtualisation/docker.nix @@ -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); }; |