mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-25 16:08:30 +02:00
initial vaultwarden config
This commit is contained in:
parent
1e517e58d2
commit
6b41537bc2
2 changed files with 28 additions and 2 deletions
24
hosts/nuc/modules/vaultwarden/default.nix
Normal file
24
hosts/nuc/modules/vaultwarden/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ 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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue