From 7b9e42399970ec6de8c1d8df7d2ccfae0b6a5c1f Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sun, 25 Feb 2024 23:24:07 +0100 Subject: [PATCH] =?UTF-8?q?forgejo:=20final=20name=20changes=20gitea=20?= =?UTF-8?q?=E2=86=92=20forgejo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mostly just replacing strings to avoid confusion later on. Since our containers are now ephemeral, renaming them is basically a non-issue (though the files under /persist/containers & the uffd client name had to be changed manually) --- parsons/forgejo.nix | 6 +++--- parsons/nftables.nix | 2 +- pkgs/uffd/default.nix | 2 +- pkgs/uffd/{gitea-magic.patch => forgejo-magic.patch} | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename pkgs/uffd/{gitea-magic.patch => forgejo-magic.patch} (96%) diff --git a/parsons/forgejo.nix b/parsons/forgejo.nix index 898e5a9..2832b22 100644 --- a/parsons/forgejo.nix +++ b/parsons/forgejo.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, evalConfig, ... }: { - containers.gitea = { + containers.forgejo = { privateNetwork = true; hostAddress = "192.168.100.1"; localAddress = "192.168.100.10"; @@ -9,7 +9,7 @@ ephemeral = true; bindMounts = { "/persist" = { - hostPath = "/persist/containers/gitea"; + hostPath = "/persist/containers/forgejo"; isReadOnly = false; }; }; @@ -94,7 +94,7 @@ forceSSL = true; enableACME = true; locations."/" = { - proxyPass = "http://${config.containers.gitea.localAddress}:3000"; + proxyPass = "http://${config.containers.forgejo.localAddress}:3000"; }; }; } diff --git a/parsons/nftables.nix b/parsons/nftables.nix index 6a9cc4c..6e5ebc0 100644 --- a/parsons/nftables.nix +++ b/parsons/nftables.nix @@ -65,7 +65,7 @@ table ip nat { chain prerouting { type nat hook prerouting priority -100 - iifname enp35s0 tcp dport { 22 } dnat ${config.containers.gitea.localAddress}:22 + iifname enp35s0 tcp dport { 22 } dnat ${config.containers.forgejo.localAddress}:22 } chain postrouting { type nat hook postrouting priority 100 diff --git a/pkgs/uffd/default.nix b/pkgs/uffd/default.nix index 45801e4..b8997bf 100644 --- a/pkgs/uffd/default.nix +++ b/pkgs/uffd/default.nix @@ -10,7 +10,7 @@ python3Packages.buildPythonPackage rec { hash = "sha256-KP4J1bw5u7MklaPu2SBFRNyGgkKOBOpft5MMH+em5M4="; }; - patches = [ ./gitea-magic.patch ./fix-setuppy.patch ./fix-userinfo.patch ]; + patches = [ ./forgejo-magic.patch ./fix-setuppy.patch ./fix-userinfo.patch ]; propagatedBuildInputs = with python3Packages; [ flask diff --git a/pkgs/uffd/gitea-magic.patch b/pkgs/uffd/forgejo-magic.patch similarity index 96% rename from pkgs/uffd/gitea-magic.patch rename to pkgs/uffd/forgejo-magic.patch index a2b3430..fc165b6 100644 --- a/pkgs/uffd/gitea-magic.patch +++ b/pkgs/uffd/forgejo-magic.patch @@ -16,7 +16,7 @@ index d13fd42..94352be 100644 def userinfo(): user = request.oauth.user + client = request.oauth.client_id -+ if client == "gitea": ++ if client == "forgejo": + return jsonify( + id=user.unix_uid, + full_name=user.displayname,