summary refs log tree commit diff
path: root/host/Rory-nginx/services/containers/matrixunittests-conduit
diff options
context:
space:
mode:
Diffstat (limited to 'host/Rory-nginx/services/containers/matrixunittests-conduit')
-rwxr-xr-xhost/Rory-nginx/services/containers/matrixunittests-conduit/container.nix43
-rwxr-xr-xhost/Rory-nginx/services/containers/matrixunittests-conduit/root.nix21
-rwxr-xr-xhost/Rory-nginx/services/containers/matrixunittests-conduit/services/conduit.nix9
-rwxr-xr-xhost/Rory-nginx/services/containers/matrixunittests-conduit/services/nginx.nix39
-rwxr-xr-xhost/Rory-nginx/services/containers/matrixunittests-conduit/services/pantalaimon.nix8
5 files changed, 74 insertions, 46 deletions
diff --git a/host/Rory-nginx/services/containers/matrixunittests-conduit/container.nix b/host/Rory-nginx/services/containers/matrixunittests-conduit/container.nix
index 28309b5..08e6760 100755
--- a/host/Rory-nginx/services/containers/matrixunittests-conduit/container.nix
+++ b/host/Rory-nginx/services/containers/matrixunittests-conduit/container.nix
@@ -1,26 +1,41 @@
-{ pkgs, lib, conduit, ... }:
+{
+  pkgs,
+  lib,
+  conduit,
+  ...
+}:
 
 {
   privateNetwork = true;
   autoStart = true;
   specialArgs = {
     inherit conduit;
-  };  
-  config = { lib, pkgs, conduit, ... }: {
-    imports = [ ./root.nix ];
-    environment.etc."resolv.conf".text = ''
-      nameserver 8.8.8.8
-      nameserver 8.4.4.8
-      nameserver 1.1.1.1
-      nameserver 1.0.0.1
+  };
+  config =
+    {
+      lib,
+      pkgs,
+      conduit,
+      ...
+    }:
+    {
+      imports = [ ./root.nix ];
+      environment.etc."resolv.conf".text = ''
+        nameserver 8.8.8.8
+        nameserver 8.4.4.8
+        nameserver 1.1.1.1
+        nameserver 1.0.0.1
       '';
-    networking.firewall = {
-      enable = true;
-      allowedTCPPorts = [ 80 5432 ];
+      networking.firewall = {
+        enable = true;
+        allowedTCPPorts = [
+          80
+          5432
+        ];
+      };
     };
-  };  
   hostAddress = "192.168.100.14";
   localAddress = "192.168.100.15";
   hostAddress6 = "fc00::5";
   localAddress6 = "fc00::6";
-}
\ No newline at end of file
+}
diff --git a/host/Rory-nginx/services/containers/matrixunittests-conduit/root.nix b/host/Rory-nginx/services/containers/matrixunittests-conduit/root.nix
index c248559..a9929d2 100755
--- a/host/Rory-nginx/services/containers/matrixunittests-conduit/root.nix
+++ b/host/Rory-nginx/services/containers/matrixunittests-conduit/root.nix
@@ -1,12 +1,17 @@
-{ config, pkgs, lib, conduit, ... }:
+{
+  config,
+  pkgs,
+  lib,
+  conduit,
+  ...
+}:
 
 {
-  imports =
-    [
-      ./services/nginx.nix
-      ./services/conduit.nix
-      ./services/pantalaimon.nix
-    ];
+  imports = [
+    ./services/nginx.nix
+    ./services/conduit.nix
+    ./services/pantalaimon.nix
+  ];
 
   environment.systemPackages = with pkgs; [
     wget
@@ -27,4 +32,4 @@
     dig
     cloud-utils
   ];
-}
\ No newline at end of file
+}
diff --git a/host/Rory-nginx/services/containers/matrixunittests-conduit/services/conduit.nix b/host/Rory-nginx/services/containers/matrixunittests-conduit/services/conduit.nix
index e01b1d0..6713b26 100755
--- a/host/Rory-nginx/services/containers/matrixunittests-conduit/services/conduit.nix
+++ b/host/Rory-nginx/services/containers/matrixunittests-conduit/services/conduit.nix
@@ -1,4 +1,10 @@
-{ config, pkgs, lib, conduit, ... }:
+{
+  config,
+  pkgs,
+  lib,
+  conduit,
+  ...
+}:
 
 {
   services.matrix-conduit = {
@@ -18,4 +24,3 @@
     };
   };
 }
-
diff --git a/host/Rory-nginx/services/containers/matrixunittests-conduit/services/nginx.nix b/host/Rory-nginx/services/containers/matrixunittests-conduit/services/nginx.nix
index a33c784..0678047 100755
--- a/host/Rory-nginx/services/containers/matrixunittests-conduit/services/nginx.nix
+++ b/host/Rory-nginx/services/containers/matrixunittests-conduit/services/nginx.nix
@@ -1,4 +1,9 @@
-{ config, pkgs, lib, ... }:
+{
+  config,
+  pkgs,
+  lib,
+  ...
+}:
 
 {
   services = {
@@ -13,22 +18,20 @@
       recommendedOptimisation = true;
       appendConfig = ''
         worker_processes 16;
-        '';
-       eventsConfig = ''
+      '';
+      eventsConfig = ''
         #use kqueue;
         worker_connections 512;
-        '';
+      '';
       appendHttpConfig = ''
         #sendfile on;
         disable_symlinks off;
       '';
-      additionalModules = with pkgs.nginxModules; [
-        moreheaders
-      ];
+      additionalModules = with pkgs.nginxModules; [ moreheaders ];
       virtualHosts = {
         "conduit.matrixunittests.rory.gay" = {
           locations."/" = {
-            proxyPass = "http://127.0.0.1:6167"; 
+            proxyPass = "http://127.0.0.1:6167";
             extraConfig = ''
               if ($request_method = 'OPTIONS') {
                 more_set_headers 'Access-Control-Allow-Origin: *';
@@ -50,23 +53,19 @@
           locations."= /.well-known/matrix/server".extraConfig = ''
             more_set_headers 'Content-Type application/json';
             more_set_headers 'Access-Control-Allow-Origin *';
-            return 200 '${builtins.toJSON {
-              "m.server" = "conduit.matrixunittests.rory.gay:443";
-            }}';
-          ''; 
+            return 200 '${builtins.toJSON { "m.server" = "conduit.matrixunittests.rory.gay:443"; }}';
+          '';
           locations."= /.well-known/matrix/client".extraConfig = ''
             more_set_headers 'Content-Type application/json';
             more_set_headers 'Access-Control-Allow-Origin *';
-            return 200 '${builtins.toJSON {
-              "m.homeserver".base_url = "https://conduit.matrixunittests.rory.gay";
-            }
-            }';
-          ''; 
+            return 200 '${builtins.toJSON { "m.homeserver".base_url = "https://conduit.matrixunittests.rory.gay"; }}';
+          '';
           locations."= /.well-known/matrix/support".extraConfig = ''
             more_set_headers 'Content-Type application/json';
             more_set_headers 'Access-Control-Allow-Origin *';
-            return 200 '${builtins.toJSON {
-              admins = [
+            return 200 '${
+              builtins.toJSON {
+                admins = [
                   {
                     matrix_id = "@emma:rory.gay";
                     role = "admin";
@@ -92,7 +91,7 @@
     };
   };
   systemd.services.nginx.serviceConfig = {
-    LimitNOFILE=5000000;
+    LimitNOFILE = 5000000;
   };
   security.acme.acceptTerms = true;
   security.acme.defaults.email = "root@rory.gay";
diff --git a/host/Rory-nginx/services/containers/matrixunittests-conduit/services/pantalaimon.nix b/host/Rory-nginx/services/containers/matrixunittests-conduit/services/pantalaimon.nix
index b5f7f77..da95e76 100755
--- a/host/Rory-nginx/services/containers/matrixunittests-conduit/services/pantalaimon.nix
+++ b/host/Rory-nginx/services/containers/matrixunittests-conduit/services/pantalaimon.nix
@@ -1,4 +1,9 @@
-{ config, pkgs, lib, ... }:
+{
+  config,
+  pkgs,
+  lib,
+  ...
+}:
 
 {
   services.pantalaimon-headless = {
@@ -13,4 +18,3 @@
   };
 
 }
-