initial work on iu + more compose refactoring
This commit is contained in:
1 parent
4f716499c9
commit
1e8cf01461
6 files changed
+82
-12
No files matched your search
@@ -39,6 +39,15 @@ rec {
|
||||
// lib.optionalAttrs (svcCfg.deploy != { }) {
|
||||
deploy = svcCfg.deploy;
|
||||
}
|
||||
// lib.optionalAttrs (svcCfg.extra_hosts != [ ]) {
|
||||
extra_hosts = svcCfg.extra_hosts;
|
||||
}
|
||||
// lib.optionalAttrs (svcCfg.shm_size != null) {
|
||||
shm_size = svcCfg.shm_size;
|
||||
}
|
||||
// lib.optionalAttrs (svcCfg.network_mode != null) {
|
||||
network_mode = svcCfg.network_mode;
|
||||
}
|
||||
// svcCfg.extraConfig;
|
||||
|
||||
# Build the full compose document attrset for a group.
|
||||
|
||||
@@ -129,6 +129,31 @@
|
||||
'';
|
||||
};
|
||||
|
||||
extra_hosts = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Additional host entries to add to the container's /etc/hosts file.
|
||||
'';
|
||||
};
|
||||
|
||||
shm_size = lib.mkOption {
|
||||
type = lib.types.optional lib.types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Size of the shared memory segment to allocate.
|
||||
'';
|
||||
};
|
||||
|
||||
network_mode = lib.mkOption {
|
||||
type = lib.types.optional lib.types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Network mode to use for the container.
|
||||
Set to "host" to use the host's network stack.
|
||||
'';
|
||||
};
|
||||
|
||||
files = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
default = { };
|
||||
@@ -146,8 +171,7 @@
|
||||
default = { };
|
||||
description = ''
|
||||
Free-form attrset merged directly into the compose service
|
||||
block. Use this for keys not modelled above:
|
||||
shm_size, cap_add, ulimits, etc.
|
||||
block. Use this for keys not modelled above.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user