From b6f39969cc50293b6dce493ef3273bc0573939f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= <tm@tlater.net>
Date: Sat, 8 Jan 2022 00:27:01 +0000
Subject: [PATCH 1/2] Fix podman hostnames

It seems that with the newest version of podman container names are no
longer added as hostnames, meaning that any attempt to resolve
hostnames with the current config will fail. `localhost` is probably
more robust anyway, so we switch to that.

The bug manifests as broken services because nextcloud/gitea cannot
resolve their databases and nextcloud fails to resolve the php
server. To fix this a running system, the gitea and nextcloud database
configurations will need to be hand-edited, since those values are
only set on initialization, and not updated when changed later.
---
 configuration/services/configs/nginx-nextcloud.conf | 2 +-
 configuration/services/gitea.nix                    | 2 +-
 configuration/services/nextcloud.nix                | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configuration/services/configs/nginx-nextcloud.conf b/configuration/services/configs/nginx-nextcloud.conf
index eec7bdb..7c6ad78 100644
--- a/configuration/services/configs/nginx-nextcloud.conf
+++ b/configuration/services/configs/nginx-nextcloud.conf
@@ -27,7 +27,7 @@ http {
     #gzip  on;
 
     upstream php-handler {
-        server nextcloud-nextcloud:9000;
+        server localhost:9000;
     }
 
     server {
diff --git a/configuration/services/gitea.nix b/configuration/services/gitea.nix
index 2258566..221b976 100644
--- a/configuration/services/gitea.nix
+++ b/configuration/services/gitea.nix
@@ -24,7 +24,7 @@
 
         environment = {
           DB_TYPE = "postgres";
-          DB_HOST = "gitea-postgres:5432";
+          DB_HOST = "localhost:5432";
           DB_NAME = "gitea";
           DB_USER = "gitea";
 
diff --git a/configuration/services/nextcloud.nix b/configuration/services/nextcloud.nix
index d4a7fe5..7d94bcf 100644
--- a/configuration/services/nextcloud.nix
+++ b/configuration/services/nextcloud.nix
@@ -19,7 +19,7 @@
         environment = {
           POSTGRES_DB = "nextcloud";
           POSTGRES_USER = "nextcloud";
-          POSTGRES_HOST = "nextcloud-postgres";
+          POSTGRES_HOST = "localhost";
           OVERWRITEPROTOCOL = "https";
           TRUSTED_PROXIES = "127.0.0.1";
         };

From 0b6268475df9de3be219ae4ed0d76b168244cda8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= <tm@tlater.net>
Date: Sun, 26 Dec 2021 19:01:56 +0000
Subject: [PATCH 2/2] WIP: Update forge server sha

---
 pkgs/minecraft/forge-server.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/minecraft/forge-server.nix b/pkgs/minecraft/forge-server.nix
index 2dea39a..e26a7a5 100644
--- a/pkgs/minecraft/forge-server.nix
+++ b/pkgs/minecraft/forge-server.nix
@@ -9,7 +9,7 @@ let
     url = "${mirror}/${version}/forge-${version}-installer.jar";
     curlOpts = "--globoff";
     # Forge doesn't seem to like newer shas
-    sha1 = "e97821e5431bdcaa46e12048769922e2cdb5e2e1";
+    sha1 = "sha1-oHNpyrgHluRrAXWZJg9j+OInAwA=";
   };
 
   unpackCmd = "mkdir -p src; cp $curSrc src/forge-${version}-installer.jar";