PortValhalla/lib/modules/packages/rclone.nix
2024-10-06 21:25:34 +02:00

37 lines
897 B
Nix

{ lib, ... }:
let
inherit (lib) mkOption types;
syncType = types.submodule (
{ ... }: {
options = {
dirName = mkOption {
type = types.str;
description = "The name of the directory to sync the remote files to.";
};
cacheDuration = mkOption {
type = types.nullOr types.str;
description = "The amount of time to keep cached files.";
default = null;
};
};
});
in {
options = {
valhalla.linux.users = mkOption {
type = types.attrsOf (types.submodule (
{ ... }: {
options = {
rclone = {
configurations = mkOption {
type = types.attrsOf syncType;
description = "The configurations of the rclone mounts.";
default = { };
};
};
};
}));
};
};
}