36 lines
774 B
Nix
36 lines
774 B
Nix
{config, ...}: let
|
|
host = "127.0.0.1";
|
|
port = 8222;
|
|
in {
|
|
services.vaultwarden = {
|
|
enable = true;
|
|
|
|
config = {
|
|
DOMAIN = "https://bitwarden.spoodythe.one";
|
|
SIGNUPS_ALLOWED = false;
|
|
|
|
ROCKET_ADDRESS = host;
|
|
ROCKET_PORT = port;
|
|
ROCKET_LOG = "critical";
|
|
|
|
SMTP_HOST = host;
|
|
SMTP_PORT = 25;
|
|
SMTP_SSL = false;
|
|
|
|
SMTP_FROM = "admin@bitwarden.spoodythe.one";
|
|
SMTP_FROM_NAME = "SpoodyThe.One Bitwarden Server";
|
|
};
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [port];
|
|
networking.firewall.allowedUDPPorts = [port];
|
|
|
|
services.nginx.virtualHosts."bitwarden.spoodythe.one" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
locations."/" = {
|
|
proxyPass = "http://${host}:${toString port}";
|
|
};
|
|
};
|
|
}
|