summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorQuentin Aristote <quentin@aristote.fr>2022-08-28 14:32:49 +0200
committerQuentin Aristote <quentin@aristote.fr>2022-08-28 14:32:49 +0200
commit86b50a528a8aaf5e7eca3fb37790b7909143978d (patch)
tree12283186498c13d4a16d2c7e88a44b8ec0ccf2ae /tests
parent820c012003c784f5734a5401bf49cd6632c3c9ec (diff)
finish nginx config and add testing in vm
Diffstat (limited to 'tests')
-rw-r--r--tests/vm.nix47
1 files changed, 14 insertions, 33 deletions
diff --git a/tests/vm.nix b/tests/vm.nix
index 4894cec..e878c12 100644
--- a/tests/vm.nix
+++ b/tests/vm.nix
@@ -4,6 +4,14 @@ let
nginxPorts = lib.concatLists
(lib.mapAttrsToList (_: cfg: (builtins.map (x: x.port) cfg.listen))
config.services.nginx.virtualHosts);
+ nginxMakeLocal = port: {
+ listen = lib.mkForce [{
+ inherit port;
+ addr = "0.0.0.0";
+ }];
+ forceSSL = lib.mkForce false;
+ enableACME = lib.mkForce false;
+ };
in {
imports = [ ../configuration.nix ];
@@ -17,41 +25,14 @@ in {
firewall = { allowedTCPPorts = nginxPorts; };
};
- services.filtron.rules = lib.mkForce [];
+ services.filtron.rules = lib.mkForce [ ];
services.nginx.virtualHosts = {
- quentin = {
- listen = lib.mkForce [{
- addr = "0.0.0.0";
- port = 8080;
- }];
- forceSSL = lib.mkForce false;
- enableACME = lib.mkForce false;
- };
- searx = {
- listen = lib.mkForce [{
- addr = "0.0.0.0";
- port = 8081;
- }];
- forceSSL = lib.mkForce false;
- enableACME = lib.mkForce false;
- };
- money = {
- listen = lib.mkForce [{
- addr = "0.0.0.0";
- port = 8082;
- }];
- forceSSL = lib.mkForce false;
- enableACME = lib.mkForce false;
- };
- rss = {
- listen = lib.mkForce [{
- addr = "0.0.0.0";
- port = 8083;
- }];
- forceSSL = lib.mkForce false;
- enableACME = lib.mkForce false;
- };
+ quentin = nginxMakeLocal 8080;
+ searx = nginxMakeLocal 8081;
+ money = nginxMakeLocal 8082;
+ rss = nginxMakeLocal 8083;
+ webkeydirectory = nginxMakeLocal 8084;
};
environment.etc."searx/secrets".text = ''