Allow passing custom arguments to rclone mount
This commit is contained in:
parent
42166b10a7
commit
b2edfe64b9
1 changed files with 14 additions and 0 deletions
|
@ -89,11 +89,23 @@ let
|
||||||
default = "";
|
default = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraArgs = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
description = "A set of additional arguments to pass to `rclone mount`.";
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
|
|
||||||
config = lib.mkOption {
|
config = lib.mkOption {
|
||||||
type = lib.types.attrs;
|
type = lib.types.attrs;
|
||||||
description = "The rclone config to use for creating the mount.";
|
description = "The rclone config to use for creating the mount.";
|
||||||
visible = false;
|
visible = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
args = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
description = "The arguments to pass to `rclone mount`.";
|
||||||
|
visible = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
@ -102,6 +114,8 @@ let
|
||||||
builtins.mapAttrs
|
builtins.mapAttrs
|
||||||
(name: path: "export ${name}=\"$(cat ${lib.escapeShellArg path})\"")
|
(name: path: "export ${name}=\"$(cat ${lib.escapeShellArg path})\"")
|
||||||
config.secrets));
|
config.secrets));
|
||||||
|
|
||||||
|
args = config.extraArgs;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue