Commit Graph

217 Commits

Author SHA1 Message Date
Winter
6c53004840 nixos/nginx: allow recommended proxy settings to be enabled per location 2022-06-12 19:52:35 -04:00
ajs124
30186896ee nixos/nginx: fix SystemCallFilter for openresty 2022-05-30 11:58:28 +02:00
Izorkin
e87240e216 nixos/nginx: add extraParameters to http3 protocol 2022-04-11 22:33:12 +02:00
Izorkin
c508da303b nixos/nginx: add reuseport option 2022-04-11 22:33:12 +02:00
Izorkin
660a36f173 nixos/nginx: fix http3 configuration 2022-04-11 22:33:12 +02:00
Dominique Martinet
b0a04e4105 nginx/logrotate: run logrotate as nginx user 2022-04-01 07:09:27 +09:00
Dominique Martinet
e92c05349c nixos/logrotate: convert to freeform
using freeform is the new standard way of using modules and should replace
extraConfig.
In particular, this will allow us to place a condition on mails
2022-04-01 07:09:26 +09:00
Izorkin
b672e4dd2c
nginxModules: add option disableIPC
The disableIPC option is required to checking enabled nginxModules
and disable the SystemCallFilter IPC filter.
2022-03-08 14:37:11 +03:00
Janne Heß
e5823f77b3
Merge pull request #159187 from martinetd/logrotate
logrotate service enhancements
2022-02-23 11:24:17 +01:00
Dominique Martinet
c7618fbd9b nginx: add logrotate rule for nginx logs 2022-02-11 21:07:37 +09:00
Sandro Jäckel
ae66e2d5ec
treewide: use configured nginx package 2022-02-08 12:13:30 +01:00
Jörg Thalheim
fd382c011a
Merge branch 'master' into nginx 2022-01-31 05:44:42 +01:00
Jörg Thalheim
26ea046ed7
Update nixos/modules/services/web-servers/nginx/default.nix 2022-01-31 05:43:53 +01:00
Daniel Olsen
ab7e6995ac nixos/nginx: Add defaultListenAddresses option
Lets you specify the default listen address if none are listed in the vhost configuration.

Useful for hosts with more than one ip
2022-01-24 02:20:30 +01:00
Winter
b52607f43b nixos/acme: ensure web servers using certs can access them 2022-01-08 15:05:34 -05:00
Naïm Favier
ec150abd1a
Revert "nixos/nginx: disable rejectSSL activation when https is disabled"
This reverts commit 2f66ac01e9.
2022-01-02 21:01:29 +01:00
Lucas Savva
377c6bcefc
nixos/acme: Add defaults and inheritDefaults option
Allows configuring many default settings for certificates,
all of which can still be overridden on a per-cert basis.
Some options have been moved into .defaults from security.acme,
namely email, server, validMinDays and renewInterval. These
changes will not break existing configurations thanks to
mkChangedOptionModule.

With this, it is also now possible to configure DNS-01 with
web servers whose virtualHosts utilise enableACME. The only
requirement is you set `acmeRoot = null` for each vhost.

The test suite has been revamped to cover these additions
and also to generally make it easier to maintain. Test config
for apache and nginx has been fully standardised, and it
is now much easier to add a new web server if it follows
the same configuration patterns as those two. I have also
optimised the use of switch-to-configuration which should
speed up testing.
2021-12-26 16:44:10 +00:00
7c6f434c
b0f154fd44
Merge pull request #147027 from Izorkin/update-nginx-ktls
nginxMainline: enable ktls support
2021-12-24 10:23:17 +00:00
Sandro
e1f9dbf673
Merge pull request #139815 from ncfavier/fastcgiParams-path 2021-12-07 20:38:55 +01:00
Jörg Thalheim
8a5777dcf6 nixos/nginx: fix mincore filtering
Mincore is a syscall, not a group.
2021-12-05 12:04:20 +01:00
Izorkin
2f66ac01e9
nixos/nginx: disable rejectSSL activation when https is disabled 2021-11-27 09:39:57 +03:00
Izorkin
7376f4e34f
nixos/nginx: tengine requires allowing @ipc calls 2021-11-27 09:39:57 +03:00
Izorkin
78546bbbc5
nixos/nginx: add kTLS option 2021-11-27 09:39:57 +03:00
Sandro
9cb930ff68
nixos/nginx: fix start when recommendedOptimisation is off
Also done by other distros for example Fedora https://bodhi.fedoraproject.org/updates/FEDORA-2020-78690e2cdd
2021-11-18 21:47:12 +01:00
ajs124
c408cd921f nixos/nginx: fix SystemCallFilter after 1fc113f0df 2021-11-16 17:30:57 +01:00
Bruno Bigras
2ceae2db61 nixos/nginx: disable MemoryDenyWriteExecute for pkgs.openresty
fix #140655

Co-authored-by: Yurii Izorkin <izorkin@elven.pw>
2021-10-12 16:28:53 -04:00
Naïm Favier
2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
Naïm Favier
c965a30871
nixos/nginx: allow paths in fastcgiParams
Useful for pointing `SCRIPT_FILENAME` at a derivation.
2021-09-29 01:46:58 +02:00
Ruby Iris Juric
035dcc0e7e
nixos/nginx: fix typo in listenAdresses 2021-08-15 20:51:09 +10:00
Maciej Krüger
934698a378
nixos/nginx: make serverNamesHash{Bucket,Max}Size configurable 2021-08-13 07:27:39 +02:00
Maciej Krüger
5d73f669a8
Merge pull request #131962 from mkg20001/fc-nginx 2021-08-12 14:07:48 +02:00
Vincent Bernat
85209382c1 nginx: allow overriding SSL trusted certificates when using ACME
Some ACME providers (like Buypass) are using a different certificate
to sign OCSP responses than for server certificates. Therefore,
sslTrustedCertificate should be provided by the user and we need to
allow that.
2021-08-08 16:07:11 +02:00
Maciej Krüger
a4ca45acd7
nginx: add listenAddresses
This allows the user to manually specify the addresses nginx shoud 
listen on, while still having the convinience to use the *SSL options 
and have the ports automatically applied
2021-07-29 16:33:10 +02:00
Johannes Arnold
3a30f52676
nixos/nginx: fix typo 2021-06-28 18:08:31 +02:00
Naïm Favier
821ca7d4cc
nixos/nginx: add option rejectSSL exposing ssl_reject_handshake 2021-05-24 15:10:09 +02:00
Jörg Thalheim
b900661f6e
Merge pull request #122825 from Izorkin/update-duplicates-systemcallfilters
treewide: remove duplicates SystemCallFilters
2021-05-17 12:06:06 +01:00
Richard Marko
16b0f07890 nixos/nginx: fix comment about acme postRun not running as root
As of 67a5d66 this is no longer true, since acme postRun runs as root.
The idea of the service is good so reword a comment a bit.
2021-05-17 18:03:04 +09:00
Sandro
ec1dd62608
Merge pull request #118521 from SuperSandro2000/nginx-proxy-timeout
nixos/nginx: add option to change proxy timeouts
2021-05-17 03:15:54 +02:00
Sandro
700942d2a5
Merge pull request #121119 from SuperSandro2000/remove-gnidorah
treewide: remove gnidorah
2021-05-17 02:42:24 +02:00
Sandro Jäckel
51166f90c6
nixos/nginx: add option to change proxy timeouts 2021-05-17 02:37:44 +02:00
Izorkin
feebe402f5
treewide: remove duplicates SystemCallFilters 2021-05-13 15:44:56 +03:00
Martin Weinelt
506bc7ba02
nixos/nginx: update hardening settings
- Set an explicit umask that allows u+rwx and g+r.
- Adds `ProtectControlGroups` and `ProtectKernelLogs`, there should be
  no need to access either.
- Adds `ProtectClock` to prevent write-access to the system clock.
- `ProtectProc` hides processes from other users within the /proc
  filesystem and `ProcSubSet` hides all files/directories unrelated to
  the process management of the units process.
- Sets `RemoveIPC`, as there is no SysV or POSIX IPC within nginx that I
  know of.
- Restricts the creation of arbitrary namespaces
- Adds a reasonable `SystemCallFilter` preventing calls to @privileged,
  @obsolete and others.

And finally applies some sorting based on the order these options appear
in systemd.exec(5).
2021-04-30 18:49:43 +02:00
Sandro Jäckel
ae02415ee8
treewide: remove gnidorah
due to github account removal/deletion and not other mean of contact.
2021-04-30 01:48:19 +02:00
Lassulus
ea5759474a
Merge pull request #119803 from SuperSandro2000/SuperSandro2000-patch-1
nixos/nginx: set isSystemUser
2021-04-24 22:37:46 +02:00
Maciej Krüger
9530794548
nginx: add vhost.http3
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-04-18 20:20:24 +02:00
Sandro
15cd5fc57e
nixos/nginx: set isSystemUser 2021-04-18 16:15:48 +02:00
Sandro
0139874db9
nixos/nginx: add upstreams examples (#118447)
* nixos/nginx: add upstreams examples

I am not fully sure if they are fully correct but they deployed the right syntax.

* nixos/nginx: use literal example

* Update nixos/modules/services/web-servers/nginx/default.nix

* Update nixos/modules/services/web-servers/nginx/default.nix
2021-04-17 00:25:03 +02:00
talyz
06dee38345
Revert "nixos/nginx: fix eval for tengine"
This reverts commit 2d3200e010.
2021-04-14 16:34:10 +02:00
Sandro
39060b241c
Merge pull request #118445 from SuperSandro2000/SuperSandro2000-patch-3 2021-04-12 17:18:50 +02:00
Kim Lindberger
5a1bd5ff66
Merge pull request #116074 from talyz/discourse
discourse: Add package and NixOS module
2021-04-08 14:19:49 +02:00