1
Fork 0
satellite/hosts/nixos/lapetus/services/vaultwarden.nix

33 lines
876 B
Nix
Raw Normal View History

2024-02-10 04:15:17 +01:00
{ config, ... }:
let
port = 8404;
host = "warden.moonythm.dev";
2024-02-10 04:23:53 +01:00
dataDir = "/persist/state/var/lib/vaultwarden";
2024-02-10 04:15:17 +01:00
in
{
2024-02-10 04:23:53 +01:00
systemd.tmpfiles.rules = [ "d ${dataDir} 0700 vaultwarden vaultwarden -" ];
2024-02-10 04:15:17 +01:00
sops.secrets.vaultwarden_env.sopsFile = ../secrets.yaml;
2024-02-10 04:23:53 +01:00
services.nginx.virtualHosts.${host} =
config.satellite.proxy port { proxyWebsockets = true; };
2024-02-10 04:15:17 +01:00
services.vaultwarden = {
enable = true;
environmentFile = config.sops.secrets.vaultwarden_env.path;
config = {
DOMAIN = "https://${host}";
ROCKET_ADDRESS = "127.0.0.1";
ROCKET_PORT = port;
2024-02-10 04:23:53 +01:00
DATA_FOLDER = dataDir;
2024-02-10 04:15:17 +01:00
SIGNUPS_ALLOWED = true;
SHOW_PASSWORD_HINT = false;
SMTP_SECURITY = "force_tls";
SMTP_PORT = 465;
SMTP_HOST = "smtp.migadu.com";
SMTP_FROM = "vaultwarden@orbit.moonythm.dev";
SMTP_USERNAME = "vaultwarden";
};
};
}