yep, more dotfiles

server: add vaultwarden

wiro.world 7083f251 95fa5988

verified
Changed files
+30
nixos
profiles
secrets
+28
nixos/profiles/server.nix
···
goatcounter-port = 3010;
goatcounter-hostname = "stats.wiro.world";
+
vaultwarden-port = 3011;
+
vaultwarden-hostname = "vault.wiro.world";
+
prometheus-port = 9001;
prometheus-node-exporter-port = 9002;
headscale-metrics-port = 9003;
···
virtualHosts.${goatcounter-hostname}.extraConfig = ''
reverse_proxy http://localhost:${toString goatcounter-port}
+
'';
+
+
virtualHosts.${vaultwarden-hostname}.extraConfig = ''
+
reverse_proxy http://localhost:${toString vaultwarden-port}
'';
};
···
port = goatcounter-port;
proxy = true;
extraArgs = [ "-automigrate" ];
+
};
+
+
age.secrets.vaultwarden-env.file = ../../secrets/vaultwarden-env.age;
+
services.vaultwarden = {
+
enable = true;
+
+
environmentFile = config.age.secrets.vaultwarden-env.path;
+
config = {
+
ROCKET_PORT = vaultwarden-port;
+
DOMAIN = "https://${vaultwarden-hostname}";
+
SIGNUPS_ALLOWED = false;
+
# ADMIN_TOKEN = ...; # Via secret env
+
+
SMTP_HOST = "smtp.resend.com";
+
SMTP_PORT = 2465;
+
SMTP_SECURITY = "force_tls";
+
SMTP_USERNAME = "resend";
+
# SMTP_PASSWORD = ...; # Via secret env
+
SMTP_FROM = "bitwarden@wiro.world";
+
SMTP_FROM_NAME = "Bitwarden wiro.world";
+
};
};
};
}
+2
secrets/secrets.nix
···
"authelia-ldap-password.age".publicKeys = deploy;
"authelia-smtp-password.age".publicKeys = deploy;
"tuwunel-registration-tokens.age".publicKeys = deploy;
+
# Defines `ADMIN_TOKEN`, `SMTP_PASSWORD`
+
"vaultwarden-env.age".publicKeys = deploy;
# Not used in config but useful
"pgp-ca5e.age".publicKeys = users;
secrets/vaultwarden-env.age

This is a binary file and will not be displayed.