waffentrager: change nginx to tengine, add default location

This commit is contained in:
Mateusz Słodkowicz 2024-09-15 21:43:20 +02:00
parent d4b7c80be6
commit f8acddeb2c
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
1 changed files with 11 additions and 1 deletions

View File

@ -1,4 +1,4 @@
{ materusArg, config, lib, ... }: { materusArg, config, lib, pkgs, ... }:
{ {
options.waffentragerService.nginx.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable nginx"; options.waffentragerService.nginx.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable nginx";
@ -14,6 +14,16 @@
recommendedTlsSettings = true; recommendedTlsSettings = true;
recommendedOptimisation = true; recommendedOptimisation = true;
recommendedGzipSettings = true; recommendedGzipSettings = true;
package = pkgs.tengine;
virtualHosts."default" = {
sslTrustedCertificate = "/var/lib/mnt_acme/materus.pl/chain.pem";
sslCertificateKey = "/var/lib/mnt_acme/materus.pl/key.pem";
sslCertificate = "/var/lib/mnt_acme/materus.pl/fullchain.pem";
forceSSL = true;
http2 = false;
default = true;
locations."/" = { extraConfig = ''deny all;''; };
};
}; };
systemd.services.nginx = { systemd.services.nginx = {