1
Fork 0
satellite/hosts/nixos/lapetus/services/vaultwarden.nix

41 lines
1.1 KiB
Nix
Raw Normal View History

2024-02-10 04:15:17 +01:00
{ config, ... }:
{
2024-06-13 15:47:36 +02:00
satellite.nginx.at.warden.port = config.satellite.ports.vaultwarden;
2024-02-10 04:15:17 +01:00
2024-02-10 05:11:50 +01:00
# {{{ Secrets
sops.secrets.vaultwarden_env = {
sopsFile = ../secrets.yaml;
owner = config.users.users.vaultwarden.name;
group = config.users.users.vaultwarden.group;
};
# }}}
# {{{ General config
2024-02-10 04:15:17 +01:00
services.vaultwarden = {
enable = true;
environmentFile = config.sops.secrets.vaultwarden_env.path;
config = {
2024-06-13 15:47:36 +02:00
DOMAIN = "https://${config.satellite.nginx.at.warden.host}";
ROCKET_PORT = config.satellite.nginx.at.warden.port;
2024-02-10 04:15:17 +01:00
ROCKET_ADDRESS = "127.0.0.1";
2024-06-13 15:47:36 +02:00
SIGNUPS_ALLOWED = false;
2024-02-10 04:15:17 +01:00
SHOW_PASSWORD_HINT = false;
SMTP_SECURITY = "force_tls";
SMTP_PORT = 465;
SMTP_HOST = "smtp.migadu.com";
SMTP_FROM = "vaultwarden@orbit.moonythm.dev";
2024-02-10 05:20:41 +01:00
SMTP_USERNAME = "vaultwarden@orbit.moonythm.dev";
2024-02-10 04:15:17 +01:00
};
};
2024-02-10 04:48:43 +01:00
# }}}
# {{{ Storage
environment.persistence."/persist/state".directories = [{
directory = "/var/lib/bitwarden_rs";
mode = "u=rwx,g=,o=";
2024-02-10 05:11:50 +01:00
user = config.users.users.vaultwarden.name;
group = config.users.users.vaultwarden.group;
2024-02-10 04:48:43 +01:00
}];
# }}}
2024-02-10 04:15:17 +01:00
}