32 lines
898 B
Nix
32 lines
898 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
services.garage = {
|
|
enable = true;
|
|
package = pkgs.garage;
|
|
settings = {
|
|
metadata_dir = "/garage/metadata";
|
|
data_dir = "/garage/data";
|
|
db_engine = "lmdb";
|
|
replication_mode = "2";
|
|
rpc_bind_addr = "[::]:3901";
|
|
rpc_public_addr = "[::]:3901";
|
|
rpc_secret_file = config.age.secrets."garage-rpc-secret".path;
|
|
s3_api = {
|
|
s3_region = config.networking.hostName;
|
|
api_bind_addr = "[::]:3900";
|
|
root_domain = ".s3.nekomimi.pet";
|
|
};
|
|
s3_web = {
|
|
bind_addr = "[::]:3902";
|
|
root_domain = ".web.nekomimi.pet";
|
|
index = "index.html";
|
|
};
|
|
admin = {
|
|
api_bind_addr = "[::]:3903";
|
|
admin_token_file = config.age.secrets."garage-admin-token".path;
|
|
metrics_token_file = config.age.secrets."garage-metrics-token".path;
|
|
};
|
|
};
|
|
};
|
|
}
|