Compare commits

..

No commits in common. "1955b580dc934c425b76e51df2d2193db0954ae6" and "4a358c7d4fac19bed7c289dc43b2714dbe2811e4" have entirely different histories.

4 changed files with 53 additions and 2 deletions

View file

@ -6,6 +6,6 @@
userName = "Jurn Wubben";
extraConfig.push.autoSetupRemote = true;
};
git-credential-oauth = true;
git-credential-oauth.enable = true;
};
}

View file

@ -1,4 +1,4 @@
{lib, ...}: {
imports = [./caddy.nix ./index ./seafile.nix ./bot.nix ./immich.nix ./matrix.nix ./mail.nix];
imports = [./caddy.nix ./index ./seafile.nix ./bot.nix ./immich.nix ./matrix.nix ./mail.nix ./forgejo.nix];
options.niksos.server = lib.mkEnableOption "server servcies (such as caddy)."; #TODO: per service option.
}

37
system/server/forgejo.nix Normal file
View file

@ -0,0 +1,37 @@
{
config,
lib,
...
}: let
DOMAIN = "git.jsw.tf";
in {
config =
lib.mkIf config.niksos.server
{
services.caddy.virtualHosts.${DOMAIN}.extraConfig = ''
request_body {
max_size 512M
}
reverse_proxy localhost:9004
'';
services.forgejo = {
enable = true;
database.type = "postgres";
lfs.enable = true;
settings = {
server = {
inherit DOMAIN;
ROOT_URL = "https://${DOMAIN}/";
HTTP_PORT = 9004;
};
service.DISABLE_REGISTRATION = true;
actions = {
ENABLED = true;
DEFAULT_ACTIONS_URL = "github";
};
};
};
};
}

14
system/server/temp.nix Normal file
View file

@ -0,0 +1,14 @@
{
config,
pkgs,
lib,
inputs,
...
}: {
config = lib.mkIf config.niksos.server {
# NOTE: allows me to spin up temporarily services.
services.caddy.virtualHosts."temp.jsw.tf".extraConfig = ''
reverse_proxy :8000
'';
};
}