mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2024-11-15 13:23:11 +01:00
25 lines
604 B
Nix
25 lines
604 B
Nix
{ config, pkgs, ... }:
|
|
let
|
|
domain = "vault.rfive.de";
|
|
in
|
|
{
|
|
config.sops.secrets."vaultwarden/env" = { };
|
|
services.vaultwarden = {
|
|
enable = true;
|
|
dbBackend = "postgresql";
|
|
environmentFile = config.sops.secrets."vaultwarden/env".path;
|
|
config = {
|
|
domain = domain;
|
|
signupsAllowed = false;
|
|
rocketPort = 8000;
|
|
};
|
|
services.nginx.virtualHosts."bitwarden.example.com" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
locations."/" = {
|
|
proxyPass = "http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}";
|
|
};
|
|
};
|
|
};
|
|
}
|