depot/cluster/services/storage/default.nix

39 lines
852 B
Nix
Raw Normal View History

2023-08-28 02:32:08 +02:00
{ config, lib, ... }:
let
meshIpForNode = name: config.vars.mesh.${name}.meshIp;
in
2023-07-05 20:53:04 +02:00
{
services.storage = {
nodes = {
external = [ "prophet" ];
heresy = [ "VEGAS" ];
2023-08-28 02:32:08 +02:00
garage = [ "checkmate" "prophet" "VEGAS" ];
garageInternal = [ "VEGAS" ];
garageExternal = [ "checkmate" "prophet" ];
};
nixos = {
external = [ ./external.nix ];
heresy = [ ./heresy.nix ];
2023-08-28 02:32:08 +02:00
garage = [
./garage.nix
./garage-options.nix
2023-08-28 02:32:08 +02:00
./garage-layout.nix
];
garageInternal = [ ./garage-internal.nix ];
garageExternal = [ ./garage-external.nix ];
};
2023-07-05 20:53:04 +02:00
};
2023-08-28 02:32:08 +02:00
hostLinks = lib.genAttrs config.services.storage.nodes.garage (name: {
garageRpc = {
ipv4 = meshIpForNode name;
};
garageS3 = {
protocol = "http";
ipv4 = meshIpForNode name;
};
});
2023-07-05 20:53:04 +02:00
}