Add service.dns
This commit is contained in:
parent
0417272e0e
commit
aed2c40e77
2 changed files with 10 additions and 0 deletions
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
## Next
|
## Next
|
||||||
|
|
||||||
|
* Support `service.dns`, for overriding the DNS servers used by containers.
|
||||||
|
|
||||||
* Support `service.labels`, which is useful for autodiscovery among other things.
|
* Support `service.labels`, which is useful for autodiscovery among other things.
|
||||||
|
|
||||||
* Add a tested example for Traefik with label-based routing.
|
* Add a tested example for Traefik with label-based routing.
|
||||||
|
|
|
@ -115,6 +115,12 @@ in
|
||||||
${dockerComposeRef "devices"}
|
${dockerComposeRef "devices"}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
service.dns = mkOption {
|
||||||
|
type = listOf str;
|
||||||
|
default = [];
|
||||||
|
example = [ "8.8.8.8" "8.8.4.4" ];
|
||||||
|
description = dockerComposeRef "dns";
|
||||||
|
};
|
||||||
service.labels = mkOption {
|
service.labels = mkOption {
|
||||||
type = attrsOf str;
|
type = attrsOf str;
|
||||||
default = {};
|
default = {};
|
||||||
|
@ -258,6 +264,8 @@ in
|
||||||
inherit (config.service) extra_hosts;
|
inherit (config.service) extra_hosts;
|
||||||
} // lib.optionalAttrs (config.service.hostname != null) {
|
} // lib.optionalAttrs (config.service.hostname != null) {
|
||||||
inherit (config.service) hostname;
|
inherit (config.service) hostname;
|
||||||
|
} // lib.optionalAttrs (config.service.dns != []) {
|
||||||
|
inherit (config.service) dns;
|
||||||
} // lib.optionalAttrs (config.service.labels != {}) {
|
} // lib.optionalAttrs (config.service.labels != {}) {
|
||||||
inherit (config.service) labels;
|
inherit (config.service) labels;
|
||||||
} // lib.optionalAttrs (config.service.links != []) {
|
} // lib.optionalAttrs (config.service.links != []) {
|
||||||
|
|
Loading…
Reference in a new issue