[Nix-dev] How to enable Nginx lua module

4levels 4levels at gmail.com
Thu Apr 27 13:02:15 CEST 2017


Hi All, I finally got it to work as follows:

nixpkgs.config.packageOverrides = pkgs:
{
  nginx = pkgs.nginx.override {
    modules = [
      pkgs.nginxModules.lua
      pkgs.nginxModules.dav
      pkgs.nginxModules.moreheaders
    ];
  };
};

Glad I got it working now!

Kind regards,

Erik


On Thu, Apr 27, 2017 at 12:56 PM 4levels <4levels at gmail.com> wrote:

> Hi Eike,
>
> could you please tell me where you found that nginx config part in your
> config?
> I'm trying my very best but I'm failing miserably to override the nginx
> modules in my NixOps statements :-(
>
> Thanks in advance!
>
> Kind regards,
>
> Erik
>
> On Thu, Apr 27, 2017 at 11:58 AM 4levels <4levels at gmail.com> wrote:
>
>> Hi Eike,
>>
>> I'm actually getting infinite recursion errors when I try to add the
>> following to my sample servers.nix config:
>>
>> with import <nixpkgs/lib>;
>> let
>>   ...
>> in
>> {
>>   vm01 =
>>     { config, pkgs, nodes, nginx, nginxModules, ... }:
>>     nginx.override {
>>       modules = [
>>         nginxModules.lua
>>       ];
>>     }
>>     {
>>       deployment.targetHost = "192.168.1.50";
>>       ...
>>     };
>>     ...
>>   };
>> }
>>
>> Fails with error
>>
>> ..
>> while evaluating the module argument `nginx' in ":anon-1:anon-1":
>> infinite recursion encountered, at
>> /nix/store/yqvarbfxf3594p7p954b4qjdiwmyagm4-nixos-16.09.tar.gz/lib/modules.nix:150:28
>>
>>
>> On Thu, Apr 27, 2017 at 11:46 AM 4levels <4levels at gmail.com> wrote:
>>
>>> Hi Eike,
>>>
>>> I found similar info in the release notes for 16.03.
>>> I'm struggling to get this into my NixOps statements though, but I'm
>>> sure I'll figure it out ;-)
>>>
>>> Thanks for your swift reply!
>>>
>>> Kind regards,
>>>
>>> Erik
>>>
>>> On Thu, Apr 27, 2017 at 11:33 AM Eike <eike at eknet.org> wrote:
>>>
>>>>
>>>> Hallo Erik,
>>>>
>>>> I found this in my config files:
>>>>
>>>>     { nginx, nginxModules }:
>>>>
>>>>     nginx.override {
>>>>       modules =  [
>>>>         nginxModules.rtmp
>>>>         nginxModules.dav
>>>>         nginxModules.moreheaders
>>>>     #    nginxModules.lua
>>>>       ];
>>>>     }
>>>>
>>>> But I don't remember why I commented out the lua module. Maybe it didn't
>>>> work or I don't need it…. And this is nixos-16.09, so maybe things
>>>> changed here.
>>>>
>>>> Kind regards
>>>> Eike
>>>>
>>>> 4levels <4levels at gmail.com> writes:
>>>>
>>>> > Hi Nix Devs,
>>>> >
>>>> > I can see that Nginx can be configured to use the lua module, but I
>>>> can't
>>>> > seem to find how to enable this module?
>>>> >
>>>> > I'm probably overlooking something obvious here, but I checked all
>>>> files in
>>>> > https://github.com/NixOS/nixpkgs/blob/16.09/pkgs/servers/http/nginx
>>>> and I
>>>> > just don't see how I can enable this.
>>>> > https://nixos.org/nixos/options.html#nginx also doesn't enlighten me
>>>> either
>>>> > :-(
>>>> >
>>>> > Kind regards,
>>>> >
>>>> > Erik
>>>> > _______________________________________________
>>>> > nix-dev mailing list
>>>> > nix-dev at lists.science.uu.nl
>>>> > https://mailman.science.uu.nl/mailman/listinfo/nix-dev
>>>>
>>>>
>>>> --
>>>> gpg: AD7AC35E
>>>> finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
>>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.science.uu.nl/pipermail/nix-dev/attachments/20170427/a7399c02/attachment.html>


More information about the nix-dev mailing list