Skip to content

Commit

Permalink
feat(forgejo): enable ssh server
Browse files Browse the repository at this point in the history
  • Loading branch information
uku3lig committed May 19, 2024
1 parent 9a25403 commit c1d8953
Showing 1 changed file with 49 additions and 34 deletions.
83 changes: 49 additions & 34 deletions systems/etna/forgejo.nix
Original file line number Diff line number Diff line change
@@ -1,44 +1,59 @@
_: {
cfTunnels."git.uku3lig.net" = "http://localhost:3000";

services.forgejo = {
enable = true;
services = {
forgejo = {
enable = true;

database = {
type = "postgres";
createDatabase = true;
};

settings = {
DEFAULT.APP_NAME = "uku's forge";

server = {
DISABLE_SSH = true;
ROOT_URL = "https://git.uku3lig.net";
database = {
type = "postgres";
createDatabase = true;
};

service = {
ALLOW_ONLY_EXTERNAL_REGISTRATION = true;
# TODO enable turnstile once it gets fixed
# see codeberg:forgejo/forgejo#3832
ENABLE_CAPTCHA = true;
};

oauth2 = {
# providers are configured in the admin panel
ENABLED = true;
};

actions.ENABLED = false;

"ui.meta" = {
AUTHOR = "uku's forge";
DESCRIPTION = "the place where literally nothing gets done";
};

"repository.signing" = {
DEFAULT_TRUST_MODEL = "committer";
settings = {
DEFAULT.APP_NAME = "uku's forge";

server = {
ROOT_URL = "https://git.uku3lig.net";
START_SSH_SERVER = true;
BUILTIN_SSH_SERVER_USER = "git";
SSH_DOMAIN = "ssh.uku.moe";
SSH_LISTEN_PORT = 2222;
};

service = {
ALLOW_ONLY_EXTERNAL_REGISTRATION = true;
# TODO enable turnstile once it gets fixed
# see codeberg:forgejo/forgejo#3832
ENABLE_CAPTCHA = true;
};

oauth2 = {
# providers are configured in the admin panel
ENABLED = true;
};

actions.ENABLED = false;

"ui.meta" = {
AUTHOR = "uku's forge";
DESCRIPTION = "the place where literally nothing gets done";
};

"repository.signing" = {
DEFAULT_TRUST_MODEL = "committer";
};
};
};

frp.settings.proxies = [
{
name = "forgejo-ssh";
type = "tcp";
localIp = "127.0.0.1";
localPort = 2222;
remotePort = 22;
}
];
};
}

0 comments on commit c1d8953

Please sign in to comment.