Add service.labels

This commit is contained in:
Robert Hensing 2021-01-20 18:11:52 +01:00
parent 86e420d15c
commit 38048ada2c

View file

@ -115,6 +115,11 @@ in
${dockerComposeRef "devices"}
'';
};
service.labels = mkOption {
type = attrsOf str;
default = {};
description = dockerComposeRef "labels";
};
service.links = mkOption {
type = listOf str;
default = [];
@ -247,6 +252,8 @@ in
inherit (config.service) extra_hosts;
} // lib.optionalAttrs (config.service.hostname != null) {
inherit (config.service) hostname;
} // lib.optionalAttrs (config.service.labels != {}) {
inherit (config.service) labels;
} // lib.optionalAttrs (config.service.links != []) {
inherit (config.service) links;
} // lib.optionalAttrs (config.service.ports != []) {