refactor domain declaration

This commit is contained in:
Jalil Arfaoui 2024-11-15 22:38:36 +01:00
parent 84d99bde12
commit 2b09a4e8a2

View file

@ -1,5 +1,6 @@
{ lib, pkgs, config, ... }:
let
domain = "forge.tiqa.fr";
srv = config.services.forgejo.settings.server;
in
{
@ -7,7 +8,7 @@ in
enable = true;
recommendedGzipSettings = true;
virtualHosts.${config.services.forgejo.settings.server.DOMAIN} = {
virtualHosts.${domain} = {
forceSSL = true;
enableACME = true;
extraConfig = ''
@ -32,9 +33,9 @@ in
lfs.enable = true;
settings = {
server = {
DOMAIN = "forge.tiqa.fr";
DOMAIN = domain;
# You need to specify this to remove the port from URLs in the web UI.
ROOT_URL = "https://${srv.DOMAIN}/";
ROOT_URL = "https://${domain}/";
HTTP_PORT = 3000;
};
# You can temporarily allow registration to create an admin user.