feat(vaultwarden): init
All checks were successful
build / build-sydpc (push) Successful in 1m52s
build / build-fruitbook (push) Successful in 23s
build / build-deertopia (push) Successful in 49s

This commit is contained in:
2026-03-03 21:41:54 -07:00
parent 165806ba2c
commit 70068bf0d9
2 changed files with 46 additions and 0 deletions

View File

@@ -66,6 +66,7 @@
# umurmur.enable = true;
murmur.enable = true;
anki-sync-server.enable = true;
vaultwarden.enable = true;
servarr = {
enable = true;
prowlarr.enable = true;

View File

@@ -0,0 +1,45 @@
{ config, lib, pkgs, ... }:
let cfg = config.sydnix.deertopia.vaultwarden;
in {
options.sydnix.deertopia.vaultwarden = {
enable = lib.mkEnableOption "Vaultwarden";
};
config = lib.mkIf cfg.enable {
services.vaultwarden = {
enable = true;
config = {
ROCKET_ADDRESS = "127.0.0.1";
ROCKET_PORT = 8222;
DOMAIN = "https://vault.deertopia.net";
};
};
sydnix.impermanence.directories = [
"/var/backup/vaultwarden"
];
services.nginx.upstreams.vaultwarden.servers =
let port = toString config.services.vaultwarden.config.ROCKET_PORT;
in {
"127.0.0.1:${port}" = { };
};
sydnix.deertopia.nginx.vhosts."vault".vhost = {
forceSSL = true;
enableACME = true;
locations = {
"/".proxyPass = "http://vaultwarden";
"= /notifications/anonymous-hub" = {
proxyPass = "http://vaultwarden";
proxyWebsockets = true;
};
"= /notifications/hub" = {
proxyPass = "http://vaultwarden";
proxyWebsockets = true;
};
};
};
};
}