Reorganize files into folders

This commit is contained in:
Vili Sinervä 2024-06-06 16:53:15 +03:00
parent 951d5641a0
commit d354c5d205
No known key found for this signature in database
GPG key ID: DF8FEAF54EFAC996
9 changed files with 6 additions and 6 deletions

52
services/vaultwarden.nix Normal file
View file

@ -0,0 +1,52 @@
# Nextcloud instance
{ config, pkgs, ... }:
{
networking.firewall.allowedTCPPorts = [
80
443
];
networking.firewall.allowedUDPPorts = [ 443 ];
services = {
vaultwarden = {
enable = true;
environmentFile = "/var/lib/vaultwarden/vaultwarden.env";
config = {
DOMAIN = "https://vaultwarden.vsinerva.fi";
LOGIN_RATELIMIT_MAX_BURST = 10;
LOGIN_RATELIMIT_SECONDS = 60;
ADMIN_RATELIMIT_MAX_BURST = 10;
ADMIN_RATELIMIT_SECONDS = 60;
SENDS_ALLOWED = true;
EMERGENCY_ACCESS_ALLOWED = true;
WEB_VAULT_ENABLED = true;
SIGNUPS_ALLOWED = true;
SIGNUPS_VERIFY = true;
SIGNUPS_VERIFY_RESEND_TIME = 3600;
SIGNUPS_VERIFY_RESEND_LIMIT = 5;
SMTP_HOST = "smtp.gmail.com";
SMTP_FROM = "vmsskv12@gmail.com";
SMTP_FROM_NAME = "Vaultwarden";
SMTP_SECURITY = "force_tls";
SMTP_PRT = 587;
SMTP_USERNAME = "vmsskv12@gmail.com";
SMTP_AUTH_MECHANISM = "Login";
};
};
nginx = {
enable = true;
recommendedGzipSettings = true;
virtualHosts."vaultwarden.vsinerva.fi" = {
forceSSL = true;
kTLS = true;
sslCertificate = "/var/lib/vaultwarden/fullchain.pem";
sslCertificateKey = "/var/lib/vaultwarden/privkey.pem";
locations."/" = {
proxyPass = "http://127.0.0.1:8000";
};
};
};
};
}