Add vaultwarden service

This commit is contained in:
Théo Barnouin 2025-06-05 13:30:03 +02:00
parent 3e9dafde76
commit 2918c6fd89
6 changed files with 74 additions and 30 deletions

View file

@ -0,0 +1,28 @@
{
lib,
config,
...
}: let
cfg = config.services.vm_vaultwarden;
in {
options.services.vm_vaultwarden = {
enable = lib.mkEnableOption "Enable minimal config";
};
config = lib.mkIf cfg.enable {
age.secrets.env-file = {
file = ./secrets/env-file.age;
};
services = {
vaultwarden = {
enable = true;
dbBackend = "postgresql";
environmentFile = config.age.secrets.env-file.path;
config = {
DOMAIN = "https://vault.le43.eu";
SIGNUPS_ALLOWED = false;
IP_HEADER = "X-Forwarded-For";
};
};
};
};
}