summaryrefslogtreecommitdiff
path: root/content/theses
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--content/theses/self-sufficiency/git-forge.md24
1 files changed, 18 insertions, 6 deletions
diff --git a/content/theses/self-sufficiency/git-forge.md b/content/theses/self-sufficiency/git-forge.md
index 644c893..e589ccf 100644
--- a/content/theses/self-sufficiency/git-forge.md
+++ b/content/theses/self-sufficiency/git-forge.md
@@ -33,8 +33,6 @@ Open `forgejo/default.nix` in any text editor, and copy the following
dump.enable = true;
- useWizard = true;
-
settings = {
DEFAULT = {
APP_NAME = "<A-COOL-INSTANCE-NAME>"; # Like "yourname's Forge"
@@ -44,14 +42,28 @@ Open `forgejo/default.nix` in any text editor, and copy the following
};
server = {
- HTTP_ADDR = "127.0.0.1";
HTTP_PORT = 3040;
DOMAIN = "forge.<YOUR-DOMAIN>";
+ ROOT_URL = "http://forge.<YOUR-DOMAIN>/";
+ SSH_DOMAIN = "forge.<YOUR-DOMAIN>";
+ SSH_PORT = 22;
+ DISABLE_SSH = false;
+ };
+
+ database = {
+ DB_TYPE = "sqlite3";
};
service = {
DISABLE_REGISTRATION = false;
DEFAULT_KEEP_EMAIL_PRIVATE = true;
+ REQUIRE_SIGNIN_VIEW = false;
+ REGISTER_EMAIL_CONFIRM = false;
+ ENABLE_NOTIFY_MAIL = false;
+ ALLOW_ONLY_EXTERNAL_REGISTRATION = false;
+ ENABLE_CAPTCHA = false;
+ DEFAULT_ALLOW_CREATE_ORGANIZATION = true;
+ DEFAULT_ENABLE_TIMETRACKING = true;
};
lfs = {
@@ -61,12 +73,12 @@ Open `forgejo/default.nix` in any text editor, and copy the following
};
nginx = {
- virtualHosts."code.<YOUR-DOMAIN>" = {
+ virtualHosts."forge.<YOUR-DOMAIN>" = {
enableACME = true;
forceSSL = true;
locations."/" = {
- proxyPass = "http://127.0.0.1:${config.services.forgejo.settings.server.HTTP_PORT}";
+ proxyPass = "http://127.0.0.1:3040";
proxyWebsockets = true;
};
};
@@ -96,7 +108,7 @@ Let's break the config file down.
1) `DEFAULT` are the base options, such as the name, slogan, and type (production or development) of the instance
2) `server` are server configuration options, which are options that will be written in the `app.ini` (the forgejo config file at run-time), under the [service] tag. You can find all of them [here](https://forgejo.org/docs/latest/admin/config-cheat-sheet/#server-server)
- We set the DOMAIN to be `forge.<YOUR-DOMAIN>` so that it apperas on `git clone` commands,
- - We set the HTTP_PORT to `3010` because it's a non-standard port (the default of `3000` might clash with other services)
+ - We set the HTTP_PORT to `3040` because it's a non-standard port (the default of `3000` might clash with other services)
- We set the HTTP_ADDR to `127.0.0.1` so that the service is not accessible to anyone outside of the machine, *except* via reverse proxy through [`nginx`](/notes/self-sufficiency/web-server)
3) `service` deals with some of the more middleware things; here we have it set to allow registrations, so that we might make our own admin account. After that is done, it should be
`DISABLE_REGISTRATION = false;`
Directive (EU) 2019/790, Article 4(3); all rights regarding Text and Data Mining (TDM) are reserved.