cluster/services/storage: allow configuring garage buckets and keys through cluster options

This commit is contained in:
Max Headroom 2023-10-31 18:41:40 +01:00
parent 2ca2094d3a
commit 9edfe4f2de
2 changed files with 26 additions and 0 deletions

View file

@ -5,6 +5,10 @@ let
in in
{ {
imports = [
./options.nix
];
services.storage = { services.storage = {
nodes = { nodes = {
external = [ "prophet" ]; external = [ "prophet" ];
@ -20,6 +24,11 @@ in
./garage.nix ./garage.nix
./garage-options.nix ./garage-options.nix
./garage-layout.nix ./garage-layout.nix
{
services.garage = {
inherit (config.garage) buckets keys;
};
}
]; ];
garageInternal = [ ./garage-internal.nix ]; garageInternal = [ ./garage-internal.nix ];
garageExternal = [ ./garage-external.nix ]; garageExternal = [ ./garage-external.nix ];

View file

@ -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 = {};
};
};
}