diff --git a/machines/storage01/forgejo.nix b/machines/storage01/forgejo.nix index dfd5b8e..718b36c 100644 --- a/machines/storage01/forgejo.nix +++ b/machines/storage01/forgejo.nix @@ -1,14 +1,12 @@ { config, lib, pkgs, dgn-lib, ... }: let - inherit (dgn-lib) - setDefault; + inherit (dgn-lib) setDefault; port = 3000; host = "git.dgnum.eu"; -in -{ +in { services.gitea = { enable = true; @@ -75,9 +73,7 @@ in virtualHosts.${host} = { enableACME = true; forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:${toString port}"; - }; + locations."/" = { proxyPass = "http://127.0.0.1:${toString port}"; }; }; }; @@ -92,9 +88,8 @@ in users.groups.git = { }; dgn-secrets.options = [ - (setDefault { owner = "git"; } (builtins.filter - (lib.hasPrefix "forgejo") - config.dgn-secrets.names)) + (setDefault { owner = "git"; } + (builtins.filter (lib.hasPrefix "forgejo") config.dgn-secrets.names)) ]; networking.firewall.allowedTCPPorts = [ 80 443 ]; diff --git a/nix-patches/default.nix b/nix-patches/default.nix index 671d680..9f3e0da 100644 --- a/nix-patches/default.nix +++ b/nix-patches/default.nix @@ -5,5 +5,8 @@ # Kanidm 1.1.0-beta.13 ./246564.patch + + # Forgejo 1.20.4-0 + ./forgejo.patch ]; } diff --git a/nix-patches/forgejo.patch b/nix-patches/forgejo.patch new file mode 100644 index 0000000..b1907e4 --- /dev/null +++ b/nix-patches/forgejo.patch @@ -0,0 +1,33 @@ +diff --git a/pkgs/applications/version-management/forgejo/default.nix b/pkgs/applications/version-management/forgejo/default.nix +index d21097df07b..2ee652d8785 100644 +--- a/pkgs/applications/version-management/forgejo/default.nix ++++ b/pkgs/applications/version-management/forgejo/default.nix +@@ -23,7 +23,7 @@ let + pname = "forgejo-frontend"; + inherit (forgejo) src version; + +- npmDepsHash = "sha256-dB/uBuS0kgaTwsPYnqklT450ejLHcPAqBdDs3JT8Uxg="; ++ npmDepsHash = "sha256-YZzVw+WWqTmJafqnZ5vrzb7P6V4DTMNQwW1/+wvZEM8="; + + patches = [ + ./package-json-npm-build-frontend.patch +@@ -38,17 +38,17 @@ let + in + buildGoModule rec { + pname = "forgejo"; +- version = "1.19.4-0"; ++ version = "1.20.4-0"; + + src = fetchFromGitea { + domain = "codeberg.org"; + owner = "forgejo"; + repo = "forgejo"; + rev = "v${version}"; +- hash = "sha256-pTcnST8A4gADPBkNago9uwRFEmTx8vNONL/Emer4xLI="; ++ hash = "sha256-guKU3VG1Wyhr5p6w0asL/CopQ5b7HiNi26Tw8WCEpwE="; + }; + +- vendorHash = "sha256-LKxhNbSIRaP4EGWX6mE26G9CWfoFTrPRjrL4ShpRHWo="; ++ vendorHash = "sha256-dgtZjsLBwblhdge3BvdbK/mN/TeZKps9K5dJbqomtjo="; + + subPackages = [ "." ];