refactor
This commit is contained in:
committed by
Joakim Repomaa
parent
983e313e11
commit
7a24ac5fe6
41
hosts/freun.dev/services/vaultwarden.nix
Normal file
41
hosts/freun.dev/services/vaultwarden.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
fqdn = "pw.freun.dev";
|
||||
in
|
||||
{
|
||||
services.vaultwarden = {
|
||||
enable = true;
|
||||
dbBackend = "postgresql";
|
||||
environmentFile = "/var/secrets/vaultwarden.env";
|
||||
config = {
|
||||
DOMAIN = "https://${fqdn}";
|
||||
DATABASE_URL = "postgres://%2Fvar%2Frun%2Fpostgresql/vaultwarden";
|
||||
WEBSOCKET_ENABLED = true;
|
||||
WEBSOCKET_ADDRESS = "127.0.0.1";
|
||||
WEBSOCKET_PORT = 3012;
|
||||
SIGNUPS_VERIFY = true;
|
||||
PASSWORD_ITERATIONS = 600000;
|
||||
YUBICO_CLIENT_ID = 86799;
|
||||
SMTP_HOST = "horologium.uberspace.de";
|
||||
SMTP_FROM = "noreply@freun.dev";
|
||||
SMTP_FROM_NAME = "Vaultwarden";
|
||||
SMTP_USERNAME = "noreply@freun.dev";
|
||||
SMTP_PORT = 587;
|
||||
HELO_NAME = "freun.dev";
|
||||
ROCKET_LIMITS = "{json=10485760}";
|
||||
};
|
||||
};
|
||||
|
||||
modules.webserver.vHosts.${fqdn}.locations = {
|
||||
"/".proxy = "http://localhost:8000";
|
||||
"/notifications/hub".proxy = "http://localhost:3012";
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
ensureDatabases = [ "vaultwarden" ];
|
||||
ensureUsers = [{
|
||||
name = "vaultwarden";
|
||||
ensureDBOwnership = true;
|
||||
}];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user