PortValhalla/lib/modules/packages/rclone.nix

38 lines
897 B
Nix
Raw Normal View History

2024-08-23 16:48:30 +00:00
{ lib, ... }:
2024-10-06 19:25:34 +00:00
let
inherit (lib) mkOption types;
2024-08-23 16:48:30 +00:00
2024-10-06 19:25:34 +00:00
syncType = types.submodule (
{ ... }: {
options = {
dirName = mkOption {
type = types.str;
description = "The name of the directory to sync the remote files to.";
};
2024-08-23 16:48:30 +00:00
2024-10-06 19:25:34 +00:00
cacheDuration = mkOption {
type = types.nullOr types.str;
description = "The amount of time to keep cached files.";
default = null;
2024-08-23 16:48:30 +00:00
};
2024-10-06 19:25:34 +00:00
};
});
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 = { };
2024-08-23 16:48:30 +00:00
};
};
2024-10-06 19:25:34 +00:00
};
}));
2024-08-23 16:48:30 +00:00
};
2024-10-06 19:25:34 +00:00
};
}