diff --git a/lib/modules/rclone.nix b/lib/modules/rclone.nix index 132ed93..8405326 100644 --- a/lib/modules/rclone.nix +++ b/lib/modules/rclone.nix @@ -1,15 +1,16 @@ { config, lib, pkgs, ... }: let - nextcloud = "nextcloud"; - proton = "proton"; + syncProviders = { + nextcloud = {}; + proton = {}; + }; + syncType = lib.types.submodule ( - { name, ... }: { + { config, name, ... }: { options = { type = lib.mkOption { - type = lib.types.enum [ - nextcloud - proton - ]; + description = "The type of the sync"; + type = lib.types.enum (builtins.attrNames syncProviders); }; autoStart = lib.mkOption { @@ -32,9 +33,9 @@ let default = {}; }; - preLaunch = lib.mkOption { + secretsScript = lib.mkOption { type = lib.types.lines; - description = "A set of statements to run before launching the sync."; + description = "A script for loading secrets before launching the sync."; default = []; }; };