forgejo: replace gitea with forgejo

resolves #13
This commit is contained in:
Serĉanto de Scio 2023-03-28 11:00:56 +10:00
parent 19ed4a2485
commit 8462e1d0a8
Signed by: sercanto
GPG key ID: 7DBA9F5689EFB6AA
2 changed files with 18 additions and 11 deletions

View file

@ -10,7 +10,7 @@
../networks/linode.nix ../networks/linode.nix
../profiles/coturn.nix ../profiles/coturn.nix
#../profiles/cryptpad.nix #../profiles/cryptpad.nix
../profiles/gitea.nix ../profiles/forgejo.nix
#../profiles/hydra.nix #../profiles/hydra.nix
../profiles/iog.nix ../profiles/iog.nix
../profiles/ipv6.nix ../profiles/ipv6.nix
@ -22,7 +22,7 @@
../profiles/nixpkgs-dev.nix ../profiles/nixpkgs-dev.nix
../profiles/taskserver.nix ../profiles/taskserver.nix
../profiles/tt-rss.nix ../profiles/tt-rss.nix
../secrets/gitea.nix ../secrets/forgejo.nix
../secrets/tt-rss.nix ../secrets/tt-rss.nix
]; ];

View file

@ -1,13 +1,18 @@
# NixOps configuration for the hosts running Gitea # NixOps configuration for the hosts running Forgejo
{ {
config, config,
pkgs, pkgs,
lib, lib,
sources,
... ...
}: { }: let
sources = import ../nix/sources.nix;
unstable = import sources.nixpkgsUnstable {};
in {
services.gitea = { services.gitea = {
enable = true; # Enable Gitea enable = true; # Enable Forgejo
appName = "mcwhirter.io: Gitea Service"; # Give the site a name appName = "mcwhirter.io: Forgejo Service"; # Give the site a name
database = { database = {
type = "postgres"; # Database type type = "postgres"; # Database type
passwordFile = "/run/keys/gitea-dbpass"; # Where to find the password passwordFile = "/run/keys/gitea-dbpass"; # Where to find the password
@ -16,6 +21,7 @@
domain = "source.mcwhirter.io"; # Domain name domain = "source.mcwhirter.io"; # Domain name
rootUrl = "https://source.mcwhirter.io/"; # Root web URL rootUrl = "https://source.mcwhirter.io/"; # Root web URL
httpPort = 3002; # Provided unique port httpPort = 3002; # Provided unique port
package = unstable.forgejo; # a soft fork of gitea
settings = let settings = let
docutils = pkgs.python37.withPackages (ps: docutils = pkgs.python37.withPackages (ps:
with ps; [ with ps; [
@ -36,7 +42,8 @@
IS_INPUT_FILE = false; IS_INPUT_FILE = false;
}; };
ui = { ui = {
DEFAULT_THEME = "gitea"; # Set the default theme DEFAULT_THEME = "forgejo-auto"; # Set the default theme
THEMES = "forgejo-auto,forgejo-light,forgejo-dark,auto,arc-green,gitea";
}; };
}; };
}; };
@ -83,23 +90,23 @@
recommendedProxySettings = true; recommendedProxySettings = true;
recommendedTlsSettings = true; recommendedTlsSettings = true;
virtualHosts."source.mcwhirter.io" = { virtualHosts."source.mcwhirter.io" = {
# Gitea hostname # Forgejo hostname
enableACME = true; # Use ACME certs enableACME = true; # Use ACME certs
forceSSL = true; # Force SSL forceSSL = true; # Force SSL
locations."/".proxyPass = "http://localhost:3002/"; # Proxy Gitea locations."/".proxyPass = "http://localhost:3002/"; # Proxy Forgejo
}; };
virtualHosts."git.mcwhirter.io" = { virtualHosts."git.mcwhirter.io" = {
# Hostname to be redirected # Hostname to be redirected
enableACME = true; # Use ACME certs enableACME = true; # Use ACME certs
forceSSL = true; # Force SSL forceSSL = true; # Force SSL
locations."/".proxyPass = "http://localhost:3002/"; # Proxy Gitea locations."/".proxyPass = "http://localhost:3002/"; # Proxy Forgejo
globalRedirect = "source.mcwhirter.io"; # Redirect permanently to the host globalRedirect = "source.mcwhirter.io"; # Redirect permanently to the host
}; };
virtualHosts."code.mcwhirter.io" = { virtualHosts."code.mcwhirter.io" = {
# Hostname to be redirected # Hostname to be redirected
enableACME = true; # Use ACME certs enableACME = true; # Use ACME certs
forceSSL = true; # Force SSL forceSSL = true; # Force SSL
locations."/".proxyPass = "http://localhost:3002/"; # Proxy Gitea locations."/".proxyPass = "http://localhost:3002/"; # Proxy Forgejo
globalRedirect = "source.mcwhirter.io"; # Redirect permanently to the host globalRedirect = "source.mcwhirter.io"; # Redirect permanently to the host
}; };
}; };