Update collabora config

- Remove dead hosts from alias groups
- Fix serverAliases (extraneous www.clicks.codes, missing www.docs.clicks.codes)
- Reformat

Change-Id: I745c3b760a0c296cb5e0ed8db336eda5c3ae552b
Reviewed-on: https://git.clicks.codes/c/Infra/NixFiles/+/561
Reviewed-by: Samuel Shuert <coded@clicks.codes>
Tested-by: Skyler Grey <minion@clicks.codes>
diff --git a/modules/common/collabora.nix b/modules/common/collabora.nix
index e76613b..9c4ef94 100644
--- a/modules/common/collabora.nix
+++ b/modules/common/collabora.nix
@@ -6,12 +6,11 @@
     environment = {
       server_name = "collabora.clicks.codes";
       aliasgroup1 = "https://nextcloud.clicks.codes:443";
-      aliasgroup2 = "https://cloud.clicks.codes:443";
-      aliasgroup3 = "https://docs.clicks.codes:443";
+      aliasgroup2 = "https://www.nextcloud.clicks.codes:443";
       dictionaries = "en_US";
       extra_params = "--o:ssl.enable=false --o:ssl.termination=true";
     };
-    extraOptions = [ 
+    extraOptions = [
       "--pull=always"
       "--privileged" # needed for fast jail creation via bind mounts
     ];
@@ -19,60 +18,65 @@
   virtualisation.oci-containers.backend = "docker";
 
   #Collabora Virtual Hosts
-  services.nginx.virtualHosts.${config.virtualisation.oci-containers.containers.collabora.environment.server_name} = {
-    serverAliases = [ "www.${config.virtualisation.oci-containers.containers.collabora.environment.server_name}" "docs.clicks.codes" "www.clicks.codes" ];
-    enableACME = true;
-    forceSSL = true;
-    addSSL = false;
-    listenAddresses = [ "0.0.0.0" ];
+  services.nginx.virtualHosts.${config.virtualisation.oci-containers.containers.collabora.environment.server_name} =
+    {
+      serverAliases = [
+        "www.${config.virtualisation.oci-containers.containers.collabora.environment.server_name}"
+        "docs.clicks.codes"
+        "www.docs.clicks.codes"
+      ];
+      enableACME = true;
+      forceSSL = true;
+      addSSL = false;
+      listenAddresses = [ "0.0.0.0" ];
 
-    extraConfig = ''
-      location = / {
-        proxy_pass http://standard:9980;
-        proxy_set_header Host $host;
-      }
+      extraConfig = ''
+         location = / {
+           proxy_pass http://standard:9980;
+           proxy_set_header Host $host;
+         }
 
-      # static files
-      location ^~ /browser {
-        proxy_pass http://standard:9980;
-        proxy_set_header Host $host;
-      }
+         # static files
+         location ^~ /browser {
+           proxy_pass http://standard:9980;
+           proxy_set_header Host $host;
+         }
 
-      # WOPI discovery URL
-      location ^~ /hosting/discovery {
-        proxy_pass http://standard:9980;
-        proxy_set_header Host $host;
-      }
+         # WOPI discovery URL
+         location ^~ /hosting/discovery {
+           proxy_pass http://standard:9980;
+           proxy_set_header Host $host;
+         }
 
-      # Capabilities
-      location ^~ /hosting/capabilities {
-        proxy_pass http://standard:9980;
-        proxy_set_header Host $host;
-     }
+         # Capabilities
+         location ^~ /hosting/capabilities {
+           proxy_pass http://standard:9980;
+           proxy_set_header Host $host;
+        }
 
-     # main websocket
-     location ~ ^/cool/(.*)/ws$ {
-       proxy_pass http://standard:9980;
-       proxy_set_header Upgrade $http_upgrade;
-       proxy_set_header Connection "Upgrade";
-       proxy_set_header Host $host;
-       proxy_read_timeout 36000s;
-     }
+        # main websocket
+        location ~ ^/cool/(.*)/ws$ {
+          proxy_pass http://standard:9980;
+          proxy_set_header Upgrade $http_upgrade;
+          proxy_set_header Connection "Upgrade";
+          proxy_set_header Host $host;
+          proxy_read_timeout 36000s;
+        }
 
-     # download, presentation and image upload
-     location ~ ^/(c|l)ool {
-       proxy_pass http://standard:9980;
-       proxy_set_header Host $host;
-     }
+        # download, presentation and image upload
+        location ~ ^/(c|l)ool {
+          proxy_pass http://standard:9980;
+          proxy_set_header Host $host;
+        }
 
-     # Admin Console websocket
-     location ^~ /cool/adminws {
-       proxy_pass http://standard:9980;
-       proxy_set_header Upgrade $http_upgrade;
-       proxy_set_header Connection "Upgrade";
-       proxy_set_header Host $host;
-       proxy_read_timeout 36000s;
-     }
-    '';
-  };
+        # Admin Console websocket
+        location ^~ /cool/adminws {
+          proxy_pass http://standard:9980;
+          proxy_set_header Upgrade $http_upgrade;
+          proxy_set_header Connection "Upgrade";
+          proxy_set_header Host $host;
+          proxy_read_timeout 36000s;
+        }
+      '';
+    };
 }