docker: propagate nix.proxy into daemon environment
This commit is contained in:
parent
788a77d26a
commit
0d89afdedd
|
@ -7,6 +7,8 @@ with lib;
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.virtualisation.docker;
|
cfg = config.virtualisation.docker;
|
||||||
|
pro = config.nix.proxy;
|
||||||
|
proxy_env = optionalAttrs (pro != "") { Environment = "\"http_proxy=${pro}\""; };
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
@ -73,7 +75,7 @@ in
|
||||||
# goes in config bundled with docker itself
|
# goes in config bundled with docker itself
|
||||||
LimitNOFILE = 1048576;
|
LimitNOFILE = 1048576;
|
||||||
LimitNPROC = 1048576;
|
LimitNPROC = 1048576;
|
||||||
};
|
} // proxy_env;
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.sockets.docker = {
|
systemd.sockets.docker = {
|
||||||
|
@ -99,7 +101,7 @@ in
|
||||||
# goes in config bundled with docker itself
|
# goes in config bundled with docker itself
|
||||||
LimitNOFILE = 1048576;
|
LimitNOFILE = 1048576;
|
||||||
LimitNPROC = 1048576;
|
LimitNPROC = 1048576;
|
||||||
};
|
} // proxy_env;
|
||||||
|
|
||||||
# Presumably some containers are running we don't want to interrupt
|
# Presumably some containers are running we don't want to interrupt
|
||||||
restartIfChanged = false;
|
restartIfChanged = false;
|
||||||
|
|
Loading…
Reference in New Issue