From 2ef3d6a4aaf03d247b3f4f690c051427c58cee0e Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Tue, 28 Mar 2023 12:14:35 +1000 Subject: [PATCH] forgejo: replace gitea with forgejo resolves #7 --- hosts/toscano.nix | 4 ++-- profiles/{gitea.nix => forgejo.nix} | 17 ++++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) rename profiles/{gitea.nix => forgejo.nix} (84%) diff --git a/hosts/toscano.nix b/hosts/toscano.nix index 589e9cc..3811812 100644 --- a/hosts/toscano.nix +++ b/hosts/toscano.nix @@ -9,13 +9,13 @@ }: { imports = [ ../networks/linode.nix - ../profiles/gitea.nix + ../profiles/forgejo.nix ../profiles/hakyll-skeleton.nix ../profiles/jfdic-web.nix ../profiles/resrok-web.nix ../profiles/tmateServer.nix ../profiles/voc-web.nix - ../secrets/gitea.nix + ../secrets/forgejo.nix ]; deployment.targetHost = "45.79.236.198"; diff --git a/profiles/gitea.nix b/profiles/forgejo.nix similarity index 84% rename from profiles/gitea.nix rename to profiles/forgejo.nix index cfee7bb..83e10c6 100644 --- a/profiles/gitea.nix +++ b/profiles/forgejo.nix @@ -1,13 +1,14 @@ -# NixOps configuration for the hosts running Gitea +# NixOps configuration for the hosts running Forgejo { config, + inputs, pkgs, lib, ... -}: { + }: { services.gitea = { - enable = true; # Enable Gitea - appName = "JFDI Collective: Gitea Service"; # Give the site a name + enable = true; # Enable Forgejo + appName = "JFDI Collective: Forgejo Service"; # Give the site a name database = { type = "postgres"; # Database type passwordFile = "/run/keys/gitea-dbpass"; # Where to find the password @@ -16,6 +17,7 @@ domain = "source.jfdic.org"; # Domain name rootUrl = "https://source.jfdic.org/"; # Root web URL httpPort = 3002; # Provided unique port + package = inputs.nixpkgsUnstable.legacyPackages."${pkgs.system}".forgejo; # a soft fork of gitea settings = let docutils = pkgs.python37.withPackages (ps: with ps; [ @@ -40,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"; }; }; }; @@ -85,10 +88,10 @@ recommendedProxySettings = true; recommendedTlsSettings = true; virtualHosts."source.jfdic.org" = { - # 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 }; };