cluster/services/storage: allow configuring garage buckets and keys through cluster options
This commit is contained in:
parent
2ca2094d3a
commit
9edfe4f2de
2 changed files with 26 additions and 0 deletions
|
@ -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 ];
|
||||
|
|
17
cluster/services/storage/options.nix
Normal file
17
cluster/services/storage/options.nix
Normal 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 = {};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue