{ config, pkgs, ... }:

{
  services.vaultwarden = {
    enable = true;
    config = {
      DOMAIN = "https://passwords.danielk.me";
      SIGNUPS_ALLOWED = false;
      
      ROCKET_ADDRESS = "127.0.0.1";
      ROCKET_PORT = 8222;
    };
  };

  services.caddy.virtualHosts."passwords.danielk.me" = {
    extraConfig = ''
      reverse_proxy 127.0.0.1:8222
    '';
  };

  # environment.persistence."/persistent".directories = [ "/var/lib/bitwarden_rs" ];
}
