1
Fork 0

Add tmpfile for vaultwarden

This commit is contained in:
Matei Adriel 2024-02-10 04:23:53 +01:00
parent c51668691a
commit 17bc9c8886
No known key found for this signature in database

View file

@ -2,9 +2,13 @@
let
port = 8404;
host = "warden.moonythm.dev";
dataDir = "/persist/state/var/lib/vaultwarden";
in
{
systemd.tmpfiles.rules = [ "d ${dataDir} 0700 vaultwarden vaultwarden -" ];
sops.secrets.vaultwarden_env.sopsFile = ../secrets.yaml;
services.nginx.virtualHosts.${host} =
config.satellite.proxy port { proxyWebsockets = true; };
services.vaultwarden = {
enable = true;
@ -13,7 +17,7 @@ in
DOMAIN = "https://${host}";
ROCKET_ADDRESS = "127.0.0.1";
ROCKET_PORT = port;
DATA_FOLDER = "/persist/state/var/lib/vaultwarden";
DATA_FOLDER = dataDir;
SIGNUPS_ALLOWED = true;
SHOW_PASSWORD_HINT = false;
@ -25,7 +29,4 @@ in
SMTP_USERNAME = "vaultwarden";
};
};
services.nginx.virtualHosts.${host} =
config.satellite.proxy port { proxyWebsockets = true; };
}