feat: add server configuration

This commit is contained in:
Nickolaj Jepsen 2025-03-09 20:30:33 +01:00
parent 0d47ab58f5
commit 9665106633
42 changed files with 4282 additions and 99 deletions

View file

@ -0,0 +1,21 @@
{config, ...}: let
domain = "bitwarden.nickolaj.com";
in {
services.vaultwarden = {
enable = true;
config = {
DOMAIN = "https://${domain}";
SIGNUPS_ALLOWED = false;
ROCKET_ADDRESS = "127.0.0.1";
ROCKET_PORT = 8222;
};
};
services.nginx.virtualHosts."${domain}" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://${toString config.services.vaultwarden.config.ROCKET_ADDRESS}:${toString config.services.vaultwarden.config.ROCKET_PORT}";
};
};
}