From 1b86e3bf2f36a1398527378e920a029469048096 Mon Sep 17 00:00:00 2001 From: Tero Tervala Date: Wed, 13 Mar 2024 15:10:49 +0200 Subject: [PATCH] Add zstd compression to cache.vedenemo.dev nginx Adapted settings from https://github.com/nix-community/harmonia Signed-off-by: Tero Tervala --- flake.lock | 6 +++--- hosts/binarycache/configuration.nix | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index beae49b3..065bf902 100644 --- a/flake.lock +++ b/flake.lock @@ -141,11 +141,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1704295289, - "narHash": "sha256-9WZDRfpMqCYL6g/HNWVvXF0hxdaAgwgIGeLYiOhmes8=", + "lastModified": 1710695816, + "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b0b2c5445c64191fd8d0b31f2b1a34e45a64547d", + "rev": "614b4613980a522ba49f0d194531beddbb7220d3", "type": "github" }, "original": { diff --git a/hosts/binarycache/configuration.nix b/hosts/binarycache/configuration.nix index c50cef5d..e64c4454 100644 --- a/hosts/binarycache/configuration.nix +++ b/hosts/binarycache/configuration.nix @@ -56,6 +56,7 @@ }; services.nginx = { + recommendedZstdSettings = true; virtualHosts = { "cache.vedenemo.dev" = { enableACME = true; @@ -63,6 +64,10 @@ default = true; locations."/" = { proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}"; + extraConfig = '' + zstd on; + zstd_types application/x-nix-archive; + ''; }; }; };