diff --git a/machines/nixos/storage01/vault.nix b/machines/nixos/storage01/vault.nix new file mode 100644 index 0000000..697eac2 --- /dev/null +++ b/machines/nixos/storage01/vault.nix @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: 2025 Elias Coppens +# +# SPDX-License-Identifier: EUPL-1.2 + +_: +let + host = "vault.dgnum.eu"; + port = 3100; + clusterPort = 3101; +in +{ + config = { + services.openbao = { + enable = true; + address = "127.0.0.1:${toString port}"; + storageBackend = "raft"; + + listenerExtraConfig = '' + cluster_address = "0.0.0.0:${toString clusterPort}" + ''; + + storageConfig = '' + path = "/var/lib/raft" + node_id = "raft_storage01" + ''; + + extraConfig = '' + cluster_addr = "http://${host}:${toString clusterPort}" + api_addr = "https://${host}" + ''; + }; + + dgn-web.simpleProxies.openbao = { + inherit host port; + }; + + }; +} diff --git a/meta/dns.nix b/meta/dns.nix index 3161e18..46c5796 100644 --- a/meta/dns.nix +++ b/meta/dns.nix @@ -105,6 +105,7 @@ let "victoria-metrics" # Victoria Metrics "videos" # Peertube "pub" + "vault" # OpenBAO # Garage S3 "*.cdn"