mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-10 04:49:19 -08:00
feat: add minio+cockroachdb
This commit is contained in:
parent
bdd402ffeb
commit
2d615951a2
11 changed files with 121 additions and 12 deletions
21
services/cockroachdb.nix
Normal file
21
services/cockroachdb.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ config, meta, lib, ... }: let
|
||||
inherit (lib.attrsets) mapAttrsToList filterAttrs;
|
||||
inherit (lib.strings) concatStringsSep;
|
||||
in {
|
||||
services = {
|
||||
cockroachdb = {
|
||||
enable = true;
|
||||
insecure = true;
|
||||
join = concatStringsSep "," (mapAttrsToList (_: nixos:
|
||||
"${nixos.networks.tailscale.ipv4}:${builtins.toString nixos.services.cockroachdb.listen.port}"
|
||||
) (filterAttrs (_: nixos: nixos.services.cockroachdb.enable) meta.network.nodes.nixos));
|
||||
http = {
|
||||
address = config.networks.tailscale.ipv4;
|
||||
port = 8973;
|
||||
};
|
||||
listen = {
|
||||
address = config.networks.tailscale.ipv4;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue