From 665063ca71f3f5cc93ff185488221fa977f41370 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Wed, 24 Apr 2024 01:47:05 -0400 Subject: [PATCH 1/3] nixos/forgejo: replace `GITEA_` prefix in env with `FORGEJO_` Since https://codeberg.org/forgejo/forgejo/issues/497 has been resolved, these can now be `FORGEJO_` prefixed instead of `GITEA_`. Co-Authored-By: Emily --- nixos/modules/services/misc/forgejo.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/misc/forgejo.nix b/nixos/modules/services/misc/forgejo.nix index 299b574b4400..e80048871c71 100644 --- a/nixos/modules/services/misc/forgejo.nix +++ b/nixos/modules/services/misc/forgejo.nix @@ -784,10 +784,8 @@ in environment = { USER = cfg.user; HOME = cfg.stateDir; - # `GITEA_` prefix until https://codeberg.org/forgejo/forgejo/issues/497 - # is resolved. - GITEA_WORK_DIR = cfg.stateDir; - GITEA_CUSTOM = cfg.customDir; + FORGEJO_WORK_DIR = cfg.stateDir; + FORGEJO_CUSTOM = cfg.customDir; } // lib.listToAttrs (map (e: lib.nameValuePair e.env "%d/${e.env}") secrets); }; @@ -814,10 +812,8 @@ in environment = { USER = cfg.user; HOME = cfg.stateDir; - # `GITEA_` prefix until https://codeberg.org/forgejo/forgejo/issues/497 - # is resolved. - GITEA_WORK_DIR = cfg.stateDir; - GITEA_CUSTOM = cfg.customDir; + FORGEJO_WORK_DIR = cfg.stateDir; + FORGEJO_CUSTOM = cfg.customDir; }; serviceConfig = { From ecd595ef8069a328110c976e5f2df2fab18a96cc Mon Sep 17 00:00:00 2001 From: emilylange Date: Mon, 9 Dec 2024 18:36:51 +0100 Subject: [PATCH 2/3] nixos/forgejo: fix typo in builtin ssh server conditional This conditional was introduced in 402b5c67a8ce96709d31c40e000bfdd339b23409 and is supposed to check for `server.START_SSH_SERVER` but instead checked for `START_SSH_SERVER`. Co-Authored-By: Pyrox --- nixos/modules/services/misc/forgejo.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/forgejo.nix b/nixos/modules/services/misc/forgejo.nix index e80048871c71..a9f8126e5772 100644 --- a/nixos/modules/services/misc/forgejo.nix +++ b/nixos/modules/services/misc/forgejo.nix @@ -789,7 +789,9 @@ in } // lib.listToAttrs (map (e: lib.nameValuePair e.env "%d/${e.env}") secrets); }; - services.openssh.settings.AcceptEnv = mkIf (!cfg.settings.START_SSH_SERVER or false) "GIT_PROTOCOL"; + services.openssh.settings.AcceptEnv = mkIf ( + !cfg.settings.server.START_SSH_SERVER or false + ) "GIT_PROTOCOL"; users.users = mkIf (cfg.user == "forgejo") { forgejo = { From b80057964841d034bcbb119c4f76e4ad3c900437 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 7 May 2024 16:05:03 -0400 Subject: [PATCH 3/3] nixos/forgejo,forgejo: Add pyrox0 as a maintainer --- nixos/modules/services/misc/forgejo.nix | 1 + pkgs/by-name/fo/forgejo/generic.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/nixos/modules/services/misc/forgejo.nix b/nixos/modules/services/misc/forgejo.nix index a9f8126e5772..08e1b85a7544 100644 --- a/nixos/modules/services/misc/forgejo.nix +++ b/nixos/modules/services/misc/forgejo.nix @@ -840,5 +840,6 @@ in meta.maintainers = with lib.maintainers; [ bendlas emilylange + pyrox0 ]; } diff --git a/pkgs/by-name/fo/forgejo/generic.nix b/pkgs/by-name/fo/forgejo/generic.nix index 3ca4393aace9..2a851e523d54 100644 --- a/pkgs/by-name/fo/forgejo/generic.nix +++ b/pkgs/by-name/fo/forgejo/generic.nix @@ -195,6 +195,7 @@ buildGoModule rec { bendlas adamcstephens marie + pyrox0 ]; broken = stdenv.hostPlatform.isDarwin; mainProgram = "gitea";