Deploy Vaultwarden

This commit is contained in:
minish 2024-12-22 02:11:19 -05:00
parent 57c51c4f7c
commit 57e08d101d
Signed by: min
SSH Key Fingerprint: SHA256:NFjjdbkd6u7aoMlcrDCVvz6o2UBtlAuPm8IQ2vhZ3Fg
5 changed files with 37 additions and 0 deletions

View File

@ -13,6 +13,8 @@
"/etc/zfs"
"/var/lib/samba"
"/var/lib/bitwarden_rs"
];
files = [
"/etc/machine-id"

View File

@ -1,5 +1,6 @@
{...}: {
imports = [
./samba.nix
./vaultwarden.nix
];
}

View File

@ -0,0 +1,18 @@
{...}: let
ipInternal = "10.13.1.1";
dom = "pw.min.rip";
in {
services.vaultwarden = {
enable = true;
config = {
DOMAIN = "https://${dom}";
SIGNUPS_ALLOWED = false;
SHOW_PASSWORD_HINT = false;
ROCKET_ADDRESS = ipInternal;
ROCKET_PORT = 14210;
};
};
}

View File

@ -8,6 +8,8 @@
./nebula.nix
./prometheus.nix
./grafana.nix
./shim-vaultwarden.nix
];
security.acme = {

View File

@ -0,0 +1,14 @@
{...}: let
httpIntAddr = "10.13.1.1";
httpIntPort = 14210;
dom = "pw.min.rip";
in {
services.nginx.virtualHosts.${dom} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://${toString httpIntAddr}:${toString httpIntPort}";
};
};
}