2023-08-28 03:32:08 +03:00
|
|
|
{ config, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
meshIpForNode = name: config.vars.mesh.${name}.meshIp;
|
|
|
|
in
|
|
|
|
|
2023-07-05 21:53:04 +03:00
|
|
|
{
|
2023-10-31 19:41:40 +02:00
|
|
|
imports = [
|
|
|
|
./options.nix
|
|
|
|
];
|
|
|
|
|
2023-07-05 21:53:04 +03:00
|
|
|
services.storage = {
|
2023-08-23 01:57:35 +03:00
|
|
|
nodes = {
|
|
|
|
external = [ "prophet" ];
|
|
|
|
heresy = [ "VEGAS" ];
|
2023-08-28 03:32:08 +03:00
|
|
|
garage = [ "checkmate" "prophet" "VEGAS" ];
|
|
|
|
garageInternal = [ "VEGAS" ];
|
|
|
|
garageExternal = [ "checkmate" "prophet" ];
|
2023-08-23 01:57:35 +03:00
|
|
|
};
|
|
|
|
nixos = {
|
|
|
|
external = [ ./external.nix ];
|
|
|
|
heresy = [ ./heresy.nix ];
|
2023-08-28 03:32:08 +03:00
|
|
|
garage = [
|
|
|
|
./garage.nix
|
2023-09-03 22:21:31 +03:00
|
|
|
./garage-options.nix
|
2023-08-28 03:32:08 +03:00
|
|
|
./garage-layout.nix
|
2023-10-31 19:41:40 +02:00
|
|
|
{
|
|
|
|
services.garage = {
|
|
|
|
inherit (config.garage) buckets keys;
|
|
|
|
};
|
|
|
|
}
|
2023-08-28 03:32:08 +03:00
|
|
|
];
|
|
|
|
garageInternal = [ ./garage-internal.nix ];
|
|
|
|
garageExternal = [ ./garage-external.nix ];
|
2023-08-23 01:57:35 +03:00
|
|
|
};
|
2023-07-05 21:53:04 +03:00
|
|
|
};
|
2023-08-28 03:32:08 +03:00
|
|
|
|
|
|
|
hostLinks = lib.genAttrs config.services.storage.nodes.garage (name: {
|
|
|
|
garageRpc = {
|
|
|
|
ipv4 = meshIpForNode name;
|
|
|
|
};
|
|
|
|
garageS3 = {
|
|
|
|
protocol = "http";
|
|
|
|
ipv4 = meshIpForNode name;
|
|
|
|
};
|
|
|
|
});
|
2023-07-05 21:53:04 +03:00
|
|
|
}
|