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
../profiles/coturn.nix
#../profiles/cryptpad.nix
../profiles/gitea.nix
../profiles/forgejo.nix
#../profiles/hydra.nix
../profiles/iog.nix
../profiles/ipv6.nix
@ -22,7 +22,7 @@
../profiles/nixpkgs-dev.nix
../profiles/taskserver.nix
../profiles/tt-rss.nix
../secrets/gitea.nix
../secrets/forgejo.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,
pkgs,
lib,
sources,
...
}: {
}: let
sources = import ../nix/sources.nix;
unstable = import sources.nixpkgsUnstable {};
in {
services.gitea = {
enable = true; # Enable Gitea
appName = "mcwhirter.io: Gitea Service"; # Give the site a name
enable = true; # Enable Forgejo
appName = "mcwhirter.io: Forgejo Service"; # Give the site a name
database = {
type = "postgres"; # Database type
passwordFile = "/run/keys/gitea-dbpass"; # Where to find the password
@ -16,6 +21,7 @@
domain = "source.mcwhirter.io"; # Domain name
rootUrl = "https://source.mcwhirter.io/"; # Root web URL
httpPort = 3002; # Provided unique port
package = unstable.forgejo; # a soft fork of gitea
settings = let
docutils = pkgs.python37.withPackages (ps:
with ps; [
@ -36,7 +42,8 @@
IS_INPUT_FILE = false;
};
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;
recommendedTlsSettings = true;
virtualHosts."source.mcwhirter.io" = {
# Gitea hostname
# Forgejo hostname
enableACME = true; # Use ACME certs
forceSSL = true; # Force SSL
locations."/".proxyPass = "http://localhost:3002/"; # Proxy Gitea
locations."/".proxyPass = "http://localhost:3002/"; # Proxy Forgejo
};
virtualHosts."git.mcwhirter.io" = {
# Hostname to be redirected
enableACME = true; # Use ACME certs
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
};
virtualHosts."code.mcwhirter.io" = {
# Hostname to be redirected
enableACME = true; # Use ACME certs
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
};
};