From b5fc3737daaf17b3803959db224a43e7af6a2013 Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Tue, 9 May 2023 23:04:57 +1000 Subject: [PATCH] forgejo: migrate to reciproka.dev resolves #17 --- nixos/hosts/toscano/configuration.nix | 4 ++-- .../{forgejo.nix => reciproka-forgejo.nix} | 20 +++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) rename profiles/{forgejo.nix => reciproka-forgejo.nix} (82%) diff --git a/nixos/hosts/toscano/configuration.nix b/nixos/hosts/toscano/configuration.nix index 467beae..02417ce 100644 --- a/nixos/hosts/toscano/configuration.nix +++ b/nixos/hosts/toscano/configuration.nix @@ -1,4 +1,4 @@ -# NixOS configuration for toscano +# Nix configuration for toscano # # https://en.wikipedia.org/wiki/Joseph_Toscano { @@ -9,9 +9,9 @@ }: { imports = [ ../../../networks/linode.nix - ../../../profiles/forgejo.nix ../../../profiles/hakyll-skeleton.nix ../../../profiles/jfdic-web.nix + ../../../profiles/reciproka-forgejo.nix ../../../profiles/resrok-web.nix ../../../profiles/tmateServer.nix ../../../profiles/voc-web.nix diff --git a/profiles/forgejo.nix b/profiles/reciproka-forgejo.nix similarity index 82% rename from profiles/forgejo.nix rename to profiles/reciproka-forgejo.nix index a5c2329..cc99b37 100644 --- a/profiles/forgejo.nix +++ b/profiles/reciproka-forgejo.nix @@ -1,4 +1,4 @@ -# NixOps configuration for the hosts running Forgejo +# Nix configuration for the Reciproka Forgejo service { config, pkgs, @@ -11,13 +11,13 @@ in { services.gitea = { enable = true; # Enable Forgejo - appName = "JFDI Collective: Forgejo Service"; # Give the site a name + appName = "Reciproka Kolectiva: Forgejo Service"; # Give the site a name database = { type = "postgres"; # Database type passwordFile = config.age.secrets.forgejo.path; }; - domain = "source.jfdic.org"; # Domain name - rootUrl = "https://source.jfdic.org/"; # Root web URL + domain = "reciproka.dev"; # Domain name + rootUrl = "https://reciproka.dev/"; # Root web URL httpPort = 3002; # Provided unique port package = forgejo; # a soft fork of gitea settings = let @@ -30,7 +30,7 @@ in { in { mailer = { ENABLED = true; - FROM = "source@jfdic.org"; + FROM = "fonto@reciproka.dev"; }; repository = { DEFAULT_BRANCH = "consensus"; @@ -91,6 +91,13 @@ in { recommendedProxySettings = true; recommendedTlsSettings = true; virtualHosts."source.jfdic.org" = { + enableACME = true; # Use ACME certs + forceSSL = true; # Force SSL + locations."/" = { + return = "301 https://reciproka.dev$request_uri"; + }; + }; + virtualHosts."reciproka.dev" = { # Forgejo hostname enableACME = true; # Use ACME certs forceSSL = true; # Force SSL @@ -101,7 +108,8 @@ in { security.acme = { acceptTerms = true; certs = { - "source.jfdic.org".email = "source@jfdic.org"; + "reciproka.dev".email = "admin@reciproka.co"; + "source.jfdic.org".email = "admin@reciproka.co"; }; };