diff --git a/cluster/services/storage/default.nix b/cluster/services/storage/default.nix index 8f19915..b213aa4 100644 --- a/cluster/services/storage/default.nix +++ b/cluster/services/storage/default.nix @@ -5,6 +5,10 @@ let in { + imports = [ + ./options.nix + ]; + services.storage = { nodes = { external = [ "prophet" ]; @@ -20,6 +24,11 @@ in ./garage.nix ./garage-options.nix ./garage-layout.nix + { + services.garage = { + inherit (config.garage) buckets keys; + }; + } ]; garageInternal = [ ./garage-internal.nix ]; garageExternal = [ ./garage-external.nix ]; diff --git a/cluster/services/storage/options.nix b/cluster/services/storage/options.nix new file mode 100644 index 0000000..bbfcd37 --- /dev/null +++ b/cluster/services/storage/options.nix @@ -0,0 +1,17 @@ +{ lib, ... }: + +{ + options.garage = { + buckets = lib.mkOption { + description = "Buckets to create in Garage."; + type = with lib.types; attrsOf anything; + default = {}; + }; + + keys = lib.mkOption { + description = "Keys to create in Garage."; + type = with lib.types; attrsOf anything; + default = {}; + }; + }; +}