From bc6b6eef1c306ea4a7ae0dcf50e504704cf1a816 Mon Sep 17 00:00:00 2001 From: notohh Date: Sat, 9 Sep 2023 13:13:00 -0400 Subject: [PATCH] sakura: init vaultwarden --- hosts/sakura/services/traefik.nix | 8 ++++++++ hosts/sakura/services/vaultwarden.nix | 15 +++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 hosts/sakura/services/vaultwarden.nix diff --git a/hosts/sakura/services/traefik.nix b/hosts/sakura/services/traefik.nix index 9032adb..647f26a 100644 --- a/hosts/sakura/services/traefik.nix +++ b/hosts/sakura/services/traefik.nix @@ -104,6 +104,13 @@ tls.domains = [{main = "*.notohh.dev";}]; tls.certresolver = "production"; }; + vaultwarden = { + rule = "Host(`vault.notohh.dev`)"; + entrypoints = ["websecure"]; + service = "vaultwarden"; + tls.domains = [{main = "*.notohh.dev";}]; + tls.certresolver = "production"; + }; }; services = { authelia.loadBalancer.servers = [{url = "http://localhost:9091";}]; @@ -118,6 +125,7 @@ woodpecker-server.loadBalancer.servers = [{url = "http://localhost:8200";}]; atticd.loadBalancer.servers = [{url = "http://localhost:8100";}]; hedgedoc.loadBalancer.servers = [{url = "http://localhost:3300";}]; + vaultwarden.loadBalancer.servers = [{url = "http://localhost:8222";}]; }; }; }; diff --git a/hosts/sakura/services/vaultwarden.nix b/hosts/sakura/services/vaultwarden.nix new file mode 100644 index 0000000..5b61d53 --- /dev/null +++ b/hosts/sakura/services/vaultwarden.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + services.vaultwarden = { + enable = true; + package = pkgs.vaultwarden-postgresql; + dbBackend = "postgresql"; + config = { + SIGNUPS_ALLOWED = true; + DATABASE_URL = "postgresql://vaultwarden:vaultwarden@192.168.1.211:5432/vaultwarden"; + LOG_LEVEL = "Info"; + ROCKET_ADDRESS = "0.0.0.0"; + ROCKET_PORT = 8222; + ROCKET_LOG = "critical"; + }; + }; +}