From 0284ea30e4982ba26f41525395447b55e189bd5c Mon Sep 17 00:00:00 2001 From: hodasemi Date: Thu, 19 Jun 2025 08:15:54 +0200 Subject: [PATCH] New attempt to alter home page --- git_system.nix | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/git_system.nix b/git_system.nix index a78e018..94e3178 100644 --- a/git_system.nix +++ b/git_system.nix @@ -28,20 +28,6 @@ in 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 = { nginx = { enable = true; @@ -70,6 +56,14 @@ in ROOT_URL = "https://${srv.DOMAIN}"; HTTP_PORT = 3000; 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; actions = {