Commit Graph

1272 Commits

Author SHA1 Message Date
Raito Bezarius
69bb0f94de nixos/nginx: first-class PROXY protocol support
PROXY protocol is a convenient way to carry information about the
originating address/port of a TCP connection across multiple layers of
proxies/NAT, etc.

Currently, it is possible to make use of it in NGINX's NixOS module, but
is painful when we want to enable it "globally".
Technically, this is achieved by reworking the defaultListen options and
the objective is to have a coherent way to specify default listeners in
the current API design.
See `mkDefaultListenVhost` and `defaultListen` for the details.

It adds a safeguard against running a NGINX with no HTTP listeners (e.g.
only PROXY listeners) while asking for ACME certificates over HTTP-01.

An interesting usecase of PROXY protocol is to enable seamless IPv4 to
IPv6 proxy with origin IPv4 address for IPv6-only NGINX servers, it is
demonstrated how to achieve this in the tests, using sniproxy.

Finally, the tests covers:

- NGINX `defaultListen` mechanisms are not broken by these changes;
- NGINX PROXY protocol listeners are working in a final usecase
  (sniproxy);
- uses snakeoil TLS certs from ACME setup with wildcard certificates;

In the future, it is desirable to spoof-attack NGINX in this scenario to
ascertain that `set_real_ip_from` and all the layers are working as
intended and preventing any user from setting their origin IP address to
any arbitrary, opening up the NixOS module to bad™ vulnerabilities.

For now, it is quite hard to achieve while being minimalistic about the
tests dependencies.
2023-05-26 19:48:26 +02:00
Yaya
931a1b97f7 nixos/tests/sftpgo: init 2023-05-25 22:46:15 +02:00
Alexander Sieg
5ade08168a
outline: add nixos test 2023-05-23 12:03:39 +02:00
0x4A6F
afad0c152b
Merge pull request #214428 from mweinelt/frigate-init
frigate: init at 0.12.0
2023-05-22 18:29:37 +02:00
Ryan Lahfa
2e1e1f8765
Merge pull request #231502 from SuperSandro2000/portunus-openldap
nixos/portunus: use openldap compiled with libxcrypt-legacy
2023-05-22 18:20:52 +02:00
Martin Weinelt
c7ad6560b0
nixos/tests/frigate: init
Starts a frigate instance with a dummy video stream provided by ffmpeg.

Co-Authored-By: fleaz <mail@felixbreidenstein.de>
2023-05-22 16:29:55 +02:00
Sandro Jäckel
00000006e9
nixos/tests: init portunus 2023-05-21 23:56:02 +02:00
Thomas Gerbet
16c6122a88 varnish73: init at 7.3.0
https://varnish-cache.org/releases/rel7.3.0.html
2023-05-20 13:49:24 +02:00
Alyssa Ross
aedc462e8b nixosTests.mailman: init 2023-05-19 12:03:41 +02:00
Sandro
efb55108b3
Merge pull request #231435 from drupol/openvscode-server/systemd-service 2023-05-16 14:14:29 +02:00
Pol Dellaiera
cce7cdd293
nixosTests.openvscode-server: init 2023-05-15 21:48:08 +02:00
nikstur
46dfed6010 nixos/tests/rshim: init 2023-05-15 14:09:28 +02:00
Nicola Squartini
56e894b0b1 nixos/pam: add test for ZFS home dataset unlocking 2023-05-15 09:22:42 +02:00
Ryan Lahfa
e3bd7faa18
Merge pull request #226830 from Janik-Haag/birdwatcher
birdwatcher: init at 2.2.4, alice-lg: init at 6.0.0, nixos/birdwatcher: init, nixos/alice-lg: init
2023-05-15 08:42:10 +02:00
Janik H
40136a1f7f nixos/birdwatcher: init 2023-05-15 02:52:06 +02:00
Janik H
8ed86700a2 nixos/alice-lg: init 2023-05-15 02:52:06 +02:00
Ryan Lahfa
285330f081
Merge pull request #230153 from mklca/swap-encrypt-enhancement
nixos/config/swap: improve randomEncrytion
2023-05-14 19:01:56 +02:00
Ryan Lahfa
8ef486b60e
Merge pull request #207194 from RaitoBezarius/pixelfed-module
pixelfed: init at 0.11.5, module, tests
2023-05-14 17:09:19 +02:00
Robert Hensing
5c3e59b6d6
Merge pull request #230523 from hercules-ci/fast-nixos-test-eval
Fast nixos test eval
2023-05-11 17:34:46 +02:00
Robert Hensing
16e3647337 nixos/all-tests: Enable readOnlyPkgs by default for runTest
Most tests are not affected by this because they use the `handleTest`
function instead.
2023-05-11 16:36:49 +02:00
Robert Hensing
f659db7ba2 nixos/testing: Add node.pkgs option
By factoring out this logic, it's easier for other projects to make
use of it this optimization too (and do it correctly).
2023-05-11 16:24:00 +02:00
Robert Hensing
d0b0f9e441 nixosTests.acme: Use a read-only pkgs
This speeds up evaluation by a factor 2.

Ballpark figures from my machine:

```
$ time nix-build nixos/release.nix -A tests.acme
/nix/store/q4fxp55k64clcarsx8xc8f6s10szlfvz-vm-test-run-acme
/nix/store/lnfqg051sxx05hclva84bcbnjfc71c8x-vm-test-run-acme

real    1m28.142s
user    1m7.474s
sys     0m7.932s

$ time nix-build nixos/release.nix -A tests.acme
/nix/store/q4fxp55k64clcarsx8xc8f6s10szlfvz-vm-test-run-acme
/nix/store/lnfqg051sxx05hclva84bcbnjfc71c8x-vm-test-run-acme

real    0m38.235s
user    0m33.814s
sys     0m2.283s

```
2023-05-11 16:24:00 +02:00
Robert Hensing
b213791e7e nixos/all-tests.nix: Add readOnlyPkgs module 2023-05-11 16:24:00 +02:00
Yaya
439625d5d5 nixosTests.gitlab: Use module system based runner 2023-05-11 07:31:13 +00:00
Ilan Joselevich
7ecf20b490
nixos/harmonia: adjust module and test to upstream 2023-05-10 22:28:03 +03:00
Sandro
84b4373d8c
Merge pull request #230550 from Mic92/harmonia 2023-05-10 16:55:06 +02:00
Jörg Thalheim
76ffeaf06c nixos/harmonia: init service 2023-05-10 14:52:31 +02:00
Sandro
6197953fb6
Merge pull request #207106 from autrimpo/gonic-module
nixos/gonic: init
2023-05-08 01:28:24 +02:00
Michal Koutenský
8118e3de43 nixos/gonic: init 2023-05-07 22:43:23 +02:00
Ilan Joselevich
6a751fe806
Merge pull request #227765 from zhaofengli/darling
darling: init at unstable-2023-05-02
2023-05-07 22:29:02 +03:00
Zhaofeng Li
4b8e060167 nixos/tests/darling: init 2023-05-06 22:49:35 -06:00
Gabriel Fontes
16b3b0c53b nixos/tests/kavita: init 2023-05-06 13:57:53 -03:00
Mikaela Allan
21b6bec0ff
nixos/config/swap: improve randomEncrytion
* add sector size parameter to swap randomEncryption
  * add key size parameter to swap randomEncryption
  * allow deviceName to be overridden for encrypted swap
  * create test for swap random encryption
  * update release notes
2023-05-05 13:36:42 -04:00
Ryan Lahfa
275a6e3d8d
Merge pull request #193469 from minijackson/mount-options-stage-1
nixos/stage-1: follow mount options
2023-05-05 17:05:48 +02:00
Jacek Galowicz
3ba45b082e
Merge pull request #228111 from alyssais/nixosTest-hostname
nixosTest: remove hostname limitations
2023-05-05 08:12:36 +02:00
Jonas Heinrich
d932d6929b
Merge pull request #227401 from onny/maddytls2
nixos/maddy: Add tls option
2023-05-02 07:32:56 +02:00
Jonas Heinrich
616ba4ae5c nixos/maddy: Add tls option 2023-05-01 19:12:26 +02:00
Weijia Wang
b87aa62298
Merge pull request #227936 from wineee/dde
nixos/deepin: init
2023-05-01 08:38:45 +03:00
Kira Bruneau
50200de3f4
Merge pull request #216230 from tcheronneau/master
nixos/{consul-template,vault-agent}: init
2023-04-30 13:53:57 -04:00
Kira Bruneau
f81a619c91
Merge pull request #227916 from IndeedNotJames/lldap
lldap: init at 0.4.3; nixos/lldap: init; nixosTests.lldap: init
2023-04-29 15:24:12 -04:00
IndeedNotJames
5eb2e64d80
nixosTests.lldap: init 2023-04-29 21:14:25 +02:00
rewine
d63d98212a
nixos/tests/deepin: init 2023-04-29 22:36:22 +08:00
Yaya
5effdaaa40
nixos/tests/snipe-it: init (#180772) 2023-04-26 17:46:15 +02:00
IndeedNotJames
3e7069bb47
nixosTests.consul-template: init 2023-04-25 16:54:08 +02:00
IndeedNotJames
524fe7ff51
nixosTests.vault-agent: init 2023-04-25 15:58:30 +02:00
Minijackson
8f94053a21
nixosTests.early-mount-options: init 2023-04-25 13:07:08 +02:00
Robert Hensing
e207f4a116 nixosTests.nixos-test-driver.node-name: init 2023-04-25 12:21:38 +02:00
Robert Hensing
3ec3d283c5 nixos/tests: extra-python-packages -> nixos-test-driver/extra-python-packages
Categorizing the tests for the test driver helps with testing the test driver.
2023-04-25 12:03:15 +02:00
Mario Rodas
5249a7ce55
Merge pull request #220812 from anpin/feature/promscale-rebase
promscale: 0.10.0 -> 0.17.0
2023-04-24 21:02:25 -05:00
gaykitty
c251c021fe nixos/stargazer: init 2023-04-24 21:52:19 -03:00