2025-01-17 17:06:28 -05:00
|
|
|
{ config, lib, ... }:
|
2024-10-09 03:36:08 -04:00
|
|
|
{
|
2024-11-04 22:41:38 -05:00
|
|
|
imports = [ ./nginx ];
|
2024-10-07 11:42:34 -04:00
|
|
|
|
2025-01-17 17:06:28 -05:00
|
|
|
config = lib.mkIf config.system.server.enable {
|
|
|
|
services.vaultwarden = {
|
|
|
|
enable = true;
|
|
|
|
config = {
|
|
|
|
DOMAIN = "https://pass.${config.domains.p2}";
|
|
|
|
SIGNUPS_ALLOWED = false;
|
|
|
|
ROCKET_ADDRESS = "127.0.0.1";
|
|
|
|
ROCKET_PORT = 8222;
|
|
|
|
ROCKET_LOG = "critical";
|
2024-10-07 11:42:34 -04:00
|
|
|
|
2025-01-17 17:06:28 -05:00
|
|
|
# Smtp email
|
|
|
|
SMTP_HOST = "mx.${config.domains.p1}";
|
|
|
|
SMTP_FROM = "noreply@${config.domains.p2}";
|
|
|
|
SMTP_FROM_NAME = "Vaultwarden";
|
|
|
|
SMTP_USERNAME = "noreply@${config.domains.p2}";
|
|
|
|
SMTP_PASSWORD = config.secrets.noreplyPassword;
|
|
|
|
SMTP_SECURITY = "starttls";
|
|
|
|
SMTP_PORT = 587;
|
|
|
|
SMTP_TIMEOUT = 15;
|
|
|
|
};
|
2024-10-07 11:42:34 -04:00
|
|
|
};
|
2025-01-17 17:06:28 -05:00
|
|
|
environment.persistence."/persist".directories = [
|
|
|
|
"/var/lib/bitwarden_rs"
|
|
|
|
];
|
2024-10-07 11:42:34 -04:00
|
|
|
};
|
|
|
|
}
|