services: move vault to local

This commit is contained in:
2024-10-22 12:32:41 +02:00
parent c3df4c714e
commit efc049e739
26 changed files with 223 additions and 186 deletions

View File

@@ -18,7 +18,6 @@
./matrix.nix
./coturn.nix
./ollama.nix
./vaultwarden.nix
]
# picom, polybar and sxhkd are pulled from desktop module

View File

@@ -1,46 +0,0 @@
#
# System notifications
#
{ config, lib, pkgs, ... }:
{
services.vaultwarden = {
enable = true;
dbBackend = "postgresql";
environmentFile = config.age.secrets."services/vaultwarden/environment".path;
config = {
DOMAIN = "https://vault.kabtop.de";
SIGNUPS_ALLOWED = false;
ROCKET_ADDRESS = "127.0.0.1";
ROCKET_PORT = 8222;
ROCKET_LOG = "critical";
};
};
services.nginx = {
enable = true;
recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
virtualHosts = {
"vault.kabtop.de" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}";
};
};
};
systemd.services = {
vaultwarden = {
requires = [ "postgresql.service" ];
};
};
age.secrets."services/vaultwarden/environment" = {
file = ../../../secrets/services/vaultwarden/environment.age;
owner = "vaultwarden";
};
}