New attempt to alter home page

This commit is contained in:
hodasemi 2025-06-19 08:15:54 +02:00
parent 176c1cc354
commit 0284ea30e4

View file

@ -28,20 +28,6 @@ in
acceptTerms = true; acceptTerms = true;
}; };
systemd.services = {
copytmpl = {
enable = true;
path = [
"/run/current-system/sw/bin"
];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.coreutils}/bin/mkdir -p /var/lib/forgejo/custom/templates/ && ${pkgs.coreutils}/bin/cp ${./home.tmpl} /var/lib/forgejo/custom/templates/home.tmpl";
};
};
};
services = { services = {
nginx = { nginx = {
enable = true; enable = true;
@ -70,6 +56,14 @@ in
ROOT_URL = "https://${srv.DOMAIN}"; ROOT_URL = "https://${srv.DOMAIN}";
HTTP_PORT = 3000; HTTP_PORT = 3000;
SSH_PORT = 62; SSH_PORT = 62;
STATIC_ROOT_PATH = pkgs.runCommand "patch-templates" { } ''
mkdir -p $out
${pkgs.lib.getExe' pkgs.coreutils "cp"} -r ${pkgs.forgejo.data}/* $out
chmod u+w $out/templates/home.tmpl
${pkgs.lib.getExe' pkgs.coreutils "cp"} -f ${./home.tmpl} $out/templates/home.tmpl
chmod u-w $out/templates/home.tmpl
'';
}; };
service.DISABLE_REGISTRATION = true; service.DISABLE_REGISTRATION = true;
actions = { actions = {