mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03: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
1 changed files with 3 additions and 3 deletions
|
@ -7,8 +7,7 @@ with lib;
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.virtualisation.docker;
|
cfg = config.virtualisation.docker;
|
||||||
pro = config.networking.proxy.default;
|
proxy_env = config.networking.proxy.envVars;
|
||||||
proxy_env = optionalAttrs (pro != null) { Environment = "\"http_proxy=${pro}\""; };
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
@ -106,6 +105,7 @@ in
|
||||||
|
|
||||||
systemd.services.docker = {
|
systemd.services.docker = {
|
||||||
wantedBy = optional cfg.enableOnBoot "multi-user.target";
|
wantedBy = optional cfg.enableOnBoot "multi-user.target";
|
||||||
|
environment = proxy_env;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = [
|
ExecStart = [
|
||||||
""
|
""
|
||||||
|
@ -122,7 +122,7 @@ in
|
||||||
""
|
""
|
||||||
"${pkgs.procps}/bin/kill -s HUP $MAINPID"
|
"${pkgs.procps}/bin/kill -s HUP $MAINPID"
|
||||||
];
|
];
|
||||||
} // proxy_env;
|
};
|
||||||
|
|
||||||
path = [ pkgs.kmod ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs);
|
path = [ pkgs.kmod ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue