mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-10 04:49:19 -08:00
services/vaultwarden: Provide SMTP/email support
This commit is contained in:
parent
95d81f3832
commit
8e7d43cbab
3 changed files with 15 additions and 8 deletions
|
|
@ -73,7 +73,6 @@ with lib;
|
||||||
device = "/dev/sda";
|
device = "/dev/sda";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
domains = [ "kittywitch" "dork" ];
|
domains = [ "kittywitch" "dork" ];
|
||||||
users = [ "gitea" "kat" "keycloak" ];
|
users = [ "gitea" "kat" "keycloak" "vaultwarden" ];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ sources.nixos-mailserver.outPath ];
|
imports = [ sources.nixos-mailserver.outPath ];
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,23 @@
|
||||||
{ config, pkgs, lib, tf, ... }:
|
{ config, pkgs, lib, tf, ... }: with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
kw.secrets.variables = {
|
kw.secrets.variables = mapListToAttrs (field:
|
||||||
vaultwarden-admin-token = {
|
nameValuePair "vaultwarden-${field}" {
|
||||||
path = "secrets/vaultwarden";
|
path = "secrets/vaultwarden";
|
||||||
};
|
inherit field;
|
||||||
};
|
}) [ "password" "smtp" ];
|
||||||
|
|
||||||
secrets.files.vaultwarden-env = {
|
secrets.files.vaultwarden-env = {
|
||||||
text = ''
|
text = ''
|
||||||
ADMIN_TOKEN=${tf.variables.vaultwarden-admin-token.ref}
|
ADMIN_TOKEN=${tf.variables.vaultwarden-password.ref}
|
||||||
|
SMTP_HOST=athame.kittywit.ch
|
||||||
|
SMTP_FROM=vaultwarden@kittywit.ch
|
||||||
|
SMTP_FROM_NAME=Vaultwarden
|
||||||
|
SMTP_PORT=465
|
||||||
|
SMTP_SSL=true
|
||||||
|
SMTP_EXPLICIT_TLS=true
|
||||||
|
SMTP_USERNAME=vaultwarden@kittywit.ch
|
||||||
|
SMTP_PASSWORD=${tf.variables.vaultwarden-smtp.ref}
|
||||||
'';
|
'';
|
||||||
owner = "bitwarden_rs";
|
owner = "bitwarden_rs";
|
||||||
group = "bitwarden_rs";
|
group = "bitwarden_rs";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue