mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 08:06:50 +01:00
22 lines
539 B
Nix
22 lines
539 B
Nix
|
|
{config, ...}: let
|
||
|
|
domain = "bitwarden.nickolaj.com";
|
||
|
|
in {
|
||
|
|
services.vaultwarden = {
|
||
|
|
enable = true;
|
||
|
|
config = {
|
||
|
|
DOMAIN = "https://${domain}";
|
||
|
|
SIGNUPS_ALLOWED = false;
|
||
|
|
ROCKET_ADDRESS = "127.0.0.1";
|
||
|
|
ROCKET_PORT = 8222;
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
services.nginx.virtualHosts."${domain}" = {
|
||
|
|
enableACME = true;
|
||
|
|
forceSSL = true;
|
||
|
|
locations."/" = {
|
||
|
|
proxyPass = "http://${toString config.services.vaultwarden.config.ROCKET_ADDRESS}:${toString config.services.vaultwarden.config.ROCKET_PORT}";
|
||
|
|
};
|
||
|
|
};
|
||
|
|
}
|