faster and more secure nginx settings for blog

This commit is contained in:
Cyryl Płotnicki 2023-08-26 23:00:18 +01:00
parent 2e093b7d88
commit 06383391c2

View file

@ -1,16 +1,21 @@
{ {pkgs, ...}: let
config,
pkgs,
...
}: let
path = "/var/www/blog/"; path = "/var/www/blog/";
in { in {
imports = [../nginx.nix]; imports = [../nginx.nix];
services.nginx = { services.nginx = {
recommendedBrotliSettings = true;
recommendedGzipSettings = true;
recommendedTlsSettings = true;
recommendedOptimisation = true;
package = pkgs.nginxQuic;
virtualHosts = { virtualHosts = {
"blog.cyplo.dev" = { "blog.cyplo.dev" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
quic = true;
extraConfig = ''
'';
locations."/" = { locations."/" = {
root = path; root = path;
}; };