Created
December 5, 2018 14:40
-
-
Save jakubpawlowicz/5a71bffc4b743c580fa769ad7ef9990c to your computer and use it in GitHub Desktop.
How to add brotli module to nginx under NixOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
{ | |
nixpkgs.overlays = [ | |
(self: super: { | |
nginxStable = super.nginxStable.override { | |
modules = [ | |
self.nginxModules.brotli | |
]; | |
}; | |
}) | |
]; | |
services.nginx.enable = true; | |
services.nginx.commonHttpConfig = '' | |
brotli on; | |
brotli_static on; | |
brotli_types application/json application/javascript application/xml application/xml+rss image/svg+xml text/css text/html text/javascript text/plain text/xml; | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment