mirror of
https://github.com/callumio/nixfiles.git
synced 2025-12-17 03:29:20 +00:00
vaultwarden
This commit is contained in:
parent
661ded9126
commit
af15c64ead
5 changed files with 39 additions and 1 deletions
29
hosts/hermes/vaultwarden.nix
Normal file
29
hosts/hermes/vaultwarden.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{config, ...}: let
|
||||
domain = "vaultwarden.cleslie.uk";
|
||||
in {
|
||||
services = {
|
||||
cloudflare-dyndns.domains = [domain];
|
||||
vaultwarden = {
|
||||
enable = true;
|
||||
dbBackend = "sqlite";
|
||||
config = {
|
||||
DOMAIN = "https://${domain}";
|
||||
SIGNUPS_ALLOWED = false;
|
||||
ROCKET_ADDRESS = "127.0.0.1";
|
||||
ROCKET_PORT = 8222;
|
||||
ROCKET_LOG = "critical";
|
||||
};
|
||||
environmentFile = "${config.age.secrets.vaultwarden-env.path}";
|
||||
};
|
||||
|
||||
caddy.virtualHosts.${domain}.extraConfig = ''
|
||||
reverse_proxy localhost:${toString config.services.vaultwarden.config.ROCKET_PORT} {
|
||||
header_up X-Real-IP {remote_host}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
age.secrets."vaultwarden-env" = {
|
||||
file = ../../secrets/vaultwarden-env.age;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue