error: syntax error, unexpected '(', at /etc/nixos/geoip.nix:47:3
(use '--show-trace' to show detailed location information)
building Nix...
error: syntax error, unexpected '(', at /etc/nixos/geoip.nix:47:3
(use '--show-trace' to show detailed location information)
building the system configuration...
error: syntax error, unexpected '(', at /etc/nixos/geoip.nix:47:3
By unexpected ( it means those () that are placed around pkgs.nginx.overrideAttrs snippet
error: syntax error, unexpected '=', expecting ')', at /etc/nixos/geoip.nix:47:52
(use '--show-trace' to show detailed location information)
building Nix...
error: syntax error, unexpected '=', expecting ')', at /etc/nixos/geoip.nix:47:52
(use '--show-trace' to show detailed location information)
building the system configuration...
error: syntax error, unexpected '=', expecting ')', at /etc/nixos/geoip.nix:47:52
(use '--show-trace' to show detailed location information)
You want to set the services.nginx.pacakge option. That is what you put on the left hand side of the =.
You want to give it the value (pkgs.nginx.overrideAttrs (oldAttrs: rec { configureFlags = oldAttrs.configureFlags ++ [ "--add-module=${ngx_http_geoip2_module}" ]; buildInputs = oldAttrs.buildInputs ++ [ pkgs.libmaxminddb ]; })).override{ modules = with pkgs.nginxModules; [ipscrub]; }, that is what you put on the right hand side of the =.