Re-add Vaultwarden
This commit is contained in:
parent
07fde36fb0
commit
7f2b50f736
|
@ -13,7 +13,7 @@
|
||||||
paperless.enable = true;
|
paperless.enable = true;
|
||||||
pihole.enable = true;
|
pihole.enable = true;
|
||||||
tubearchivist-container.enable = true;
|
tubearchivist-container.enable = true;
|
||||||
# vaultwarden.enable = true;
|
vaultwarden.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -9,5 +9,6 @@
|
||||||
./paperless.nix
|
./paperless.nix
|
||||||
./pi-hole.nix
|
./pi-hole.nix
|
||||||
./tubearchivist-container.nix
|
./tubearchivist-container.nix
|
||||||
|
./vaultwarden.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
31
nix/modules/nixos/features/homelab/vaultwarden.nix
Normal file
31
nix/modules/nixos/features/homelab/vaultwarden.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
options.features.homelab.vaultwarden.enable = mkEnableOption "Enable vaultwarden";
|
||||||
|
|
||||||
|
config = mkIf config.features.homelab.vaultwarden.enable {
|
||||||
|
services = {
|
||||||
|
vaultwarden = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
config = {
|
||||||
|
DOMAIN = "https://vaultwarden.opdavies.uk";
|
||||||
|
|
||||||
|
# TODO: check registrations are disabled.
|
||||||
|
SIGNUPS_ALLOWED = false;
|
||||||
|
|
||||||
|
ROCKET_ADDRESS = "127.0.0.1";
|
||||||
|
ROCKET_PORT = 8222;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
caddy.virtualHosts."vaultwarden.opdavies.uk" = {
|
||||||
|
useACMEHost = "opdavies.uk";
|
||||||
|
|
||||||
|
extraConfig = "reverse_proxy localhost:${toString config.services.vaultwarden.config.ROCKET_PORT}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue