switch to nginx
This commit is contained in:
@@ -1,14 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
services.caddy = {
|
|
||||||
enable = true;
|
|
||||||
virtualHosts."k3t.dev".extraConfig = ''
|
|
||||||
encode zstd gzip
|
|
||||||
root /var/www/k3t.dev/
|
|
||||||
file_server browse
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
# in order to avoid having ADMIN_TOKEN in the nix store it can be also set with the help of an environment file
|
# in order to avoid having ADMIN_TOKEN in the nix store it can be also set with the help of an environment file
|
||||||
# be aware that this file must be created by hand (or via secrets management like sops)
|
# be aware that this file must be created by hand (or via secrets management like sops)
|
||||||
environmentFile = "/var/lib/vaultwarden/vaultwarden.env";
|
environmentFile = "/var/lib/vaultwarden/vaultwarden.env";
|
||||||
|
configureNginx = true;
|
||||||
config = {
|
config = {
|
||||||
# Refer to https://github.com/dani-garcia/vaultwarden/blob/main/.env.template
|
# Refer to https://github.com/dani-garcia/vaultwarden/blob/main/.env.template
|
||||||
DOMAIN = "https://bitwarden.k3t.dev";
|
DOMAIN = "https://bitwarden.k3t.dev";
|
||||||
@@ -17,11 +18,11 @@
|
|||||||
ROCKET_LOG = "critical";
|
ROCKET_LOG = "critical";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.caddy.virtualHosts."bitwarden.k3t.dev".extraConfig = ''
|
services.nginx.virtualHosts."bitwarden.k3t.dev".enableACME = true;
|
||||||
encode zstd gzip
|
#services.caddy.virtualHosts."bitwarden.k3t.dev".extraConfig = ''
|
||||||
|
# encode zstd gzip
|
||||||
reverse_proxy :${toString config.services.vaultwarden.config.ROCKET_PORT} {
|
# reverse_proxy :${toString config.services.vaultwarden.config.ROCKET_PORT} {
|
||||||
header_up X-Real-IP {remote_host}
|
# header_up X-Real-IP {remote_host}
|
||||||
}
|
# }
|
||||||
'';
|
#'';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user