From ccebdcb41b6fcfabd6142e18cb7ab27bf6464971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sat, 10 Jan 2026 21:09:23 +0200 Subject: [PATCH] compress the index.html page --- hosts/fwminex/configuration.nix | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/hosts/fwminex/configuration.nix b/hosts/fwminex/configuration.nix index 7aa64fb..acaea7c 100644 --- a/hosts/fwminex/configuration.nix +++ b/hosts/fwminex/configuration.nix @@ -366,10 +366,22 @@ in ''; "jakstys.lt".extraConfig = let - jakstysLandingPage = pkgs.runCommand "jakstys-landing-page" { } '' - mkdir -p $out - cp ${../../jakstys.lt.html} $out/index.html - ''; + jakstysLandingPage = + pkgs.runCommand "jakstys-landing-page" + { + nativeBuildInputs = with pkgs; [ + zstd + brotli + zopfli + ]; + } + '' + mkdir -p $out + cp ${../../jakstys.lt.html} $out/index.html + zstd -k -19 $out/index.html + brotli -k $out/index.html + zopfli -k $out/index.html + ''; in '' @redirects {