cleaner volumes
This commit is contained in:
1 parent
2e940cc2c8
commit
c82088b35a
4 files changed
+24
-8
No files matched your search
@@ -52,7 +52,7 @@
|
||||
];
|
||||
environment.DOCKGE_STACKS_DIR = "/opt/stacks";
|
||||
};
|
||||
extraConfig.volumes = {
|
||||
volumes = {
|
||||
dockge-data = {
|
||||
driver = "local";
|
||||
driver_opts = {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
];
|
||||
environment.DOCKGE_STACKS_DIR = "/opt/stacks";
|
||||
};
|
||||
extraConfig.volumes = {
|
||||
volumes = {
|
||||
dockge-data = {
|
||||
driver = "local";
|
||||
driver_opts = {
|
||||
@@ -69,7 +69,7 @@
|
||||
networks = [ ];
|
||||
};
|
||||
};
|
||||
extraConfig.volumes = {
|
||||
volumes = {
|
||||
scrypted-nvr = {
|
||||
driver = "local";
|
||||
driver_opts = {
|
||||
|
||||
@@ -48,8 +48,8 @@ rec {
|
||||
grpCfg.services;
|
||||
networks = networks;
|
||||
}
|
||||
// lib.optionalAttrs (grpCfg.volumes != [ ]) {
|
||||
volumes = lib.genAttrs grpCfg.volumes (_: { });
|
||||
// lib.optionalAttrs (grpCfg.volumes != { }) {
|
||||
volumes = grpCfg.volumes;
|
||||
}
|
||||
// grpCfg.extraConfig;
|
||||
|
||||
|
||||
@@ -126,9 +126,25 @@
|
||||
};
|
||||
|
||||
volumes = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
description = "Named volumes declared at the top level of the compose document.";
|
||||
type = lib.types.attrsOf lib.types.anything;
|
||||
default = { };
|
||||
example = {
|
||||
my-vol = {
|
||||
driver = "local";
|
||||
driver_opts = {
|
||||
type = "nfs";
|
||||
o = "addr=host,rw,nfsvers=4.0";
|
||||
device = ":/export/path";
|
||||
};
|
||||
};
|
||||
bare-vol = { };
|
||||
};
|
||||
description = ''
|
||||
Named volumes declared at the top level of the compose document
|
||||
(maps to the compose volumes: block). Key = volume name, value =
|
||||
volume definition (driver/driver_opts/etc.). Use an empty attrset
|
||||
for a default-driver named volume.
|
||||
'';
|
||||
};
|
||||
|
||||
networks = lib.mkOption {
|
||||
|
||||
Reference in new issue
Block a user