forgejo: replace gitea with forgejo

resolves #7
This commit is contained in:
Fiscal Velvet Poet 2023-03-28 12:14:35 +10:00
parent 026aaf8deb
commit 2ef3d6a4aa
Signed by: fiscalvelvetpoet
GPG key ID: D8EBFD58B023BD47
2 changed files with 12 additions and 9 deletions

View file

@ -9,13 +9,13 @@
}: { }: {
imports = [ imports = [
../networks/linode.nix ../networks/linode.nix
../profiles/gitea.nix ../profiles/forgejo.nix
../profiles/hakyll-skeleton.nix ../profiles/hakyll-skeleton.nix
../profiles/jfdic-web.nix ../profiles/jfdic-web.nix
../profiles/resrok-web.nix ../profiles/resrok-web.nix
../profiles/tmateServer.nix ../profiles/tmateServer.nix
../profiles/voc-web.nix ../profiles/voc-web.nix
../secrets/gitea.nix ../secrets/forgejo.nix
]; ];
deployment.targetHost = "45.79.236.198"; deployment.targetHost = "45.79.236.198";

View file

@ -1,13 +1,14 @@
# NixOps configuration for the hosts running Gitea # NixOps configuration for the hosts running Forgejo
{ {
config, config,
inputs,
pkgs, pkgs,
lib, lib,
... ...
}: { }: {
services.gitea = { services.gitea = {
enable = true; # Enable Gitea enable = true; # Enable Forgejo
appName = "JFDI Collective: Gitea Service"; # Give the site a name appName = "JFDI Collective: 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 +17,7 @@
domain = "source.jfdic.org"; # Domain name domain = "source.jfdic.org"; # Domain name
rootUrl = "https://source.jfdic.org/"; # Root web URL rootUrl = "https://source.jfdic.org/"; # Root web URL
httpPort = 3002; # Provided unique port httpPort = 3002; # Provided unique port
package = inputs.nixpkgsUnstable.legacyPackages."${pkgs.system}".forgejo; # a soft fork of gitea
settings = let settings = let
docutils = pkgs.python37.withPackages (ps: docutils = pkgs.python37.withPackages (ps:
with ps; [ with ps; [
@ -40,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";
}; };
}; };
}; };
@ -85,10 +88,10 @@
recommendedProxySettings = true; recommendedProxySettings = true;
recommendedTlsSettings = true; recommendedTlsSettings = true;
virtualHosts."source.jfdic.org" = { virtualHosts."source.jfdic.org" = {
# 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
}; };
}; };