Add service.devices option
This commit is contained in:
parent
2f11979597
commit
ac49df440f
1 changed files with 12 additions and 0 deletions
|
@ -95,6 +95,16 @@ in
|
||||||
default = [];
|
default = [];
|
||||||
description = dockerComposeRef "depends_on";
|
description = dockerComposeRef "depends_on";
|
||||||
};
|
};
|
||||||
|
service.devices = mkOption {
|
||||||
|
type = listOf str;
|
||||||
|
default = [];
|
||||||
|
description = ''
|
||||||
|
See ${link "https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities"
|
||||||
|
"<code>docker run --device</code> documentation"}
|
||||||
|
|
||||||
|
${dockerComposeRef "devices"}
|
||||||
|
'';
|
||||||
|
};
|
||||||
service.links = mkOption {
|
service.links = mkOption {
|
||||||
type = listOf str;
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
|
@ -195,6 +205,8 @@ in
|
||||||
inherit (config.service) command;
|
inherit (config.service) command;
|
||||||
} // lib.optionalAttrs (config.service.depends_on != []) {
|
} // lib.optionalAttrs (config.service.depends_on != []) {
|
||||||
inherit (config.service) depends_on;
|
inherit (config.service) depends_on;
|
||||||
|
} // lib.optionalAttrs (config.service.devices != []) {
|
||||||
|
inherit (config.service) devices;
|
||||||
} // lib.optionalAttrs (config.service.entrypoint != null) {
|
} // lib.optionalAttrs (config.service.entrypoint != null) {
|
||||||
inherit (config.service) entrypoint;
|
inherit (config.service) entrypoint;
|
||||||
} // lib.optionalAttrs (config.service.env_file != []) {
|
} // lib.optionalAttrs (config.service.env_file != []) {
|
||||||
|
|
Loading…
Reference in a new issue