Adds more configuration properties to the NixOS configuration for Nginx
- Nix 100%
| src | ||
| test | ||
| .gitignore | ||
| flake.nix | ||
| README.md | ||
nginx-utils
A Nix flake that adds more configuration properties to the NixOS configuration for Nginx.
Features
Virtual Host Config Attributes
- The following Nginx attributes for virtualHosts can now be configured in Nix, rather than just
extraConfig:allowanddenylists for IP addressesproxySetHeadersattribute set for mapping values to headersproxyBufferingtoggleproxyHttpVersionsetting
websocketLocationslist to automatically configure the default recommended websocket headers on your websocket endpoints.- This will create a location that
proxyPasses to the same proxy on/and setproxyWebsocketstotrue.
- This will create a location that
Usage
If you're using a flake to manage your system configuration, you can add this as a flake:
{
inputs = {
# nixpkgs...
nginx-utils.url = "git+https://forge.cptlobster.dev/cptlobster/nginx-utils";
};
outputs = inputs @ {
# ...
nginx-utils
}: {
nixosConfigurations.HOSTNAME = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
nginx-utils.nixosModules.default
# ...
];
};
};
}
You can then start using the added configuration parameters in your system configuration.