Skip to content

Commit

Permalink
Add zstd compression to cache.vedenemo.dev nginx
Browse files Browse the repository at this point in the history
Adapted settings from https://github.com/nix-community/harmonia

Signed-off-by: Tero Tervala <tero.tervala@unikie.com>
  • Loading branch information
tervis-unikie committed Mar 20, 2024
1 parent 26efd34 commit 1b86e3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions hosts/binarycache/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,18 @@
};

services.nginx = {
recommendedZstdSettings = true;
virtualHosts = {
"cache.vedenemo.dev" = {
enableACME = true;
forceSSL = true;
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;
'';
};
};
};
Expand Down

0 comments on commit 1b86e3b

Please sign in to comment.