rclone: ensure remotes have a type field
This commit is contained in:
parent
7a08b8c898
commit
7853236fae
3 changed files with 34 additions and 1 deletions
|
|
@ -17,7 +17,16 @@ in {
|
|||
options = {
|
||||
config = lib.mkOption {
|
||||
type = with lib.types;
|
||||
attrsOf (nullOr (oneOf [ bool int float str ]));
|
||||
let
|
||||
baseType = attrsOf (nullOr (oneOf [ bool int float str ]));
|
||||
|
||||
# Should we verify whether type constitutes a valid remote?
|
||||
remoteConfigType = addCheck baseType (lib.hasAttr "type") // {
|
||||
name = "rcloneRemoteConfig";
|
||||
description =
|
||||
"An attribute set containing a remote type and options.";
|
||||
};
|
||||
in remoteConfigType;
|
||||
default = { };
|
||||
description = ''
|
||||
Regular configuration options as described in rclone's documentation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue