From ff1d6b08292826ca4a62b148fac264ca0bb846fe Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Thu, 12 Feb 2026 22:05:17 +0100 Subject: [PATCH 01/13] Add Maple Mono Nerd Font and custom theme support to Forgejo --- .../modules/styling/forgejo/home.tmpl | 13 +++++++ .../modules/styling/forgejo/theme-custom.css | 18 +++++++++ nix-system-configs/modules/system/forgejo.nix | 39 +++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 nix-system-configs/modules/styling/forgejo/home.tmpl create mode 100644 nix-system-configs/modules/styling/forgejo/theme-custom.css diff --git a/nix-system-configs/modules/styling/forgejo/home.tmpl b/nix-system-configs/modules/styling/forgejo/home.tmpl new file mode 100644 index 0000000..0a4b2fc --- /dev/null +++ b/nix-system-configs/modules/styling/forgejo/home.tmpl @@ -0,0 +1,13 @@ +[[:Template:Template "base/head" .]] +
+
+
+
+

+ Forgejo hosted on NixOS! +

+
+
+
+
+[[:Template:Template "base/footer" .]] \ No newline at end of file diff --git a/nix-system-configs/modules/styling/forgejo/theme-custom.css b/nix-system-configs/modules/styling/forgejo/theme-custom.css new file mode 100644 index 0000000..4ad9f83 --- /dev/null +++ b/nix-system-configs/modules/styling/forgejo/theme-custom.css @@ -0,0 +1,18 @@ +@font-face { + font-family: 'Maple Mono NF'; + src: url('/assets/fonts/MapleMonoNerd.ttf') format('truetype'); + font-weight: normal; + font-style: normal; + font-display: swap; +} + +/* import base Forgejo theme so we only override what we need */ +@import "./theme-forgejo-auto.css"; + +:root { + /* prefer the Maple Mono Nerd Font for monospace usage */ + --fonts-monospace: 'Maple Mono NF', var(--fonts-monospace); + /* if you want the UI proportional font to also use Maple, set --fonts-override */ + /* --fonts-override: 'Maple Mono NF', var(--fonts-override); */ +} + diff --git a/nix-system-configs/modules/system/forgejo.nix b/nix-system-configs/modules/system/forgejo.nix index 4da5e8b..c660db5 100644 --- a/nix-system-configs/modules/system/forgejo.nix +++ b/nix-system-configs/modules/system/forgejo.nix @@ -8,6 +8,23 @@ cfg = config.services.forgejo; srv = cfg.settings.server; choose = paths: builtins.head (builtins.filter (p: builtins.pathExists p) paths); + mapleZip = pkgs.fetchurl { + url = "https://github.com/subframe7536/maple-font/releases/download/v7.9/MapleMonoNormal-NF-unhinted.zip"; + sha256 = "1j8bh8fzrnrj4348xj8l1jpbchbblhi2a7gryarf2mi88xr1yc3f"; + }; + + # Add a runCommand that unpacks the downloaded zip and exposes a stable ttf path + mapleFonts = pkgs.runCommand "maple-fonts" {buildInputs = [pkgs.unzip];} '' + mkdir -p $out/tmp + unzip -q ${mapleZip} -d $out/tmp + f="$(find $out/tmp -type f -name '*.ttf' | head -n1)" + if [ -z "$f" ]; then + echo "no ttf found" >&2 + exit 1 + fi + mkdir -p $out/fonts + cp "$f" $out/fonts/MapleMonoNerd.ttf + ''; in { options.local = { hostname = lib.mkOption { @@ -100,8 +117,30 @@ in { # ENABLED = false; # }; }; + + settings.ui = { + DEFAULT_THEME = "custom"; + THEMES = "forgejo-auto,forgejo-light,forgejo-dark,custom"; + }; }; + systemd.tmpfiles.rules = [ + "d '${config.services.forgejo.customDir}/templates' - forgejo forgejo - -" + "d '${config.services.forgejo.customDir}/public' - forgejo forgejo - -" + "d '${config.services.forgejo.customDir}/public/assets' - forgejo forgejo - -" + "d '${config.services.forgejo.customDir}/public/assets/css' - forgejo forgejo - -" + # ensure fonts directory exists + "d '${config.services.forgejo.customDir}/public/assets/fonts' - forgejo forgejo - -" + # install the TTF from the Nix store into the Forgejo customDir + "C+ '${config.services.forgejo.customDir}/public/assets/fonts/MapleMonoNerd.ttf' - forgejo forgejo - ${mapleFonts}/fonts/MapleMonoNerd.ttf" + "C+ '${config.services.forgejo.customDir}/public/assets/css/theme-custom.css' - forgejo forgejo - ${ + ../styling/forgejo/theme-custom.css + }" + "C+ '${config.services.forgejo.customDir}/templates/home.tmpl' - forgejo forgejo - ${ + ../styling/forgejo/home.tmpl + }" + ]; + # Open ports in the firewall. networking.firewall.allowedTCPPorts = [3000]; From 0f48ab5e9f88e8a7a564d9334f213f37453ed1ad Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Thu, 12 Feb 2026 22:14:36 +0100 Subject: [PATCH 02/13] Add styling directory synchronization to pull script --- nix-system-configs/modules/scripts/pull.zsh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/nix-system-configs/modules/scripts/pull.zsh b/nix-system-configs/modules/scripts/pull.zsh index 234e66e..77544ae 100755 --- a/nix-system-configs/modules/scripts/pull.zsh +++ b/nix-system-configs/modules/scripts/pull.zsh @@ -137,11 +137,27 @@ else print_warn "Secrets directory not found: ${SECRETS_DIR}" fi -# Step 2.2: Sync system_scripts directory +# Step 2.2: Sync styling directory (copy custom themes, templates, css etc.) +STYLING_DIR="${SCRIPT_DIR}/../../styling" +STYLING_TARGET="/etc/styling" + +if [[ -d "$STYLING_DIR" ]]; then + print_info "Syncing styling to ${BOLD}${STYLING_TARGET}${RESET}..." + if sudo rsync -av --delete "${STYLING_DIR}/" "${STYLING_TARGET}/"; then + print_success "Styling synced" + else + print_error "Failed to sync styling" + exit 1 + fi +else + print_warn "Styling directory not found: ${STYLING_DIR}" +fi + +# Step 2.3: Sync system_scripts directory SYSTEM_SCRIPT_DIR="${SCRIPT_DIR}/../system_scripts" SYSTEM_SCRIPT_TARGET="/etc/nixos/system_scripts" -if [[ -d "$SECRETS_DIR" ]]; then +if [[ -d "$SYSTEM_SCRIPT_DIR" ]]; then print_info "Syncing system scripts to ${BOLD}${SYSTEM_SCRIPT_TARGET}${RESET}..." if sudo rsync -av --delete "${SYSTEM_SCRIPT_DIR}/" "${SYSTEM_SCRIPT_TARGET}/"; then print_success "System scripts synced" From 4ad4f8868329ca1cc3d557b113be3732eb902a85 Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Thu, 12 Feb 2026 22:17:20 +0100 Subject: [PATCH 03/13] Fix styling directory path in pull script --- nix-system-configs/modules/scripts/pull.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix-system-configs/modules/scripts/pull.zsh b/nix-system-configs/modules/scripts/pull.zsh index 77544ae..0e2775b 100755 --- a/nix-system-configs/modules/scripts/pull.zsh +++ b/nix-system-configs/modules/scripts/pull.zsh @@ -138,7 +138,7 @@ else fi # Step 2.2: Sync styling directory (copy custom themes, templates, css etc.) -STYLING_DIR="${SCRIPT_DIR}/../../styling" +STYLING_DIR="${SCRIPT_DIR}/../styling" STYLING_TARGET="/etc/styling" if [[ -d "$STYLING_DIR" ]]; then From e940a8ecab852c394318e7084bc4a8b50790aa26 Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Thu, 12 Feb 2026 22:32:30 +0100 Subject: [PATCH 04/13] Force Maple Mono NF font. --- nix-system-configs/modules/styling/forgejo/theme-custom.css | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nix-system-configs/modules/styling/forgejo/theme-custom.css b/nix-system-configs/modules/styling/forgejo/theme-custom.css index 4ad9f83..dc77ca7 100644 --- a/nix-system-configs/modules/styling/forgejo/theme-custom.css +++ b/nix-system-configs/modules/styling/forgejo/theme-custom.css @@ -11,8 +11,6 @@ :root { /* prefer the Maple Mono Nerd Font for monospace usage */ - --fonts-monospace: 'Maple Mono NF', var(--fonts-monospace); - /* if you want the UI proportional font to also use Maple, set --fonts-override */ - /* --fonts-override: 'Maple Mono NF', var(--fonts-override); */ + --fonts-override: 'Maple Mono NF', var(--fonts-override); } From 45baa88a03196b4ec102c384089bec0fab604220 Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Thu, 12 Feb 2026 22:48:46 +0100 Subject: [PATCH 05/13] Force Maple Mono NF font. --- nix-system-configs/modules/styling/forgejo/theme-custom.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix-system-configs/modules/styling/forgejo/theme-custom.css b/nix-system-configs/modules/styling/forgejo/theme-custom.css index dc77ca7..634f6ad 100644 --- a/nix-system-configs/modules/styling/forgejo/theme-custom.css +++ b/nix-system-configs/modules/styling/forgejo/theme-custom.css @@ -11,6 +11,6 @@ :root { /* prefer the Maple Mono Nerd Font for monospace usage */ - --fonts-override: 'Maple Mono NF', var(--fonts-override); + --fonts-monospace: 'Maple Mono NF' !important; } From 33af8ac5b35e4eb9fbce189df436ddade5f9ad7c Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Thu, 12 Feb 2026 22:57:56 +0100 Subject: [PATCH 06/13] CSS my beloathed. --- nix-system-configs/modules/styling/forgejo/header.tmpl | 2 ++ .../modules/styling/forgejo/theme-custom.css | 8 +++----- nix-system-configs/modules/system/forgejo.nix | 9 +++++++++ 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 nix-system-configs/modules/styling/forgejo/header.tmpl diff --git a/nix-system-configs/modules/styling/forgejo/header.tmpl b/nix-system-configs/modules/styling/forgejo/header.tmpl new file mode 100644 index 0000000..241df9e --- /dev/null +++ b/nix-system-configs/modules/styling/forgejo/header.tmpl @@ -0,0 +1,2 @@ +{{/* This will be injected into via $FORGEJO_CUSTOM/templates/custom/header.tmpl */}} + diff --git a/nix-system-configs/modules/styling/forgejo/theme-custom.css b/nix-system-configs/modules/styling/forgejo/theme-custom.css index 634f6ad..7c12ccd 100644 --- a/nix-system-configs/modules/styling/forgejo/theme-custom.css +++ b/nix-system-configs/modules/styling/forgejo/theme-custom.css @@ -1,3 +1,5 @@ +@import "./theme-forgejo-auto.css"; + @font-face { font-family: 'Maple Mono NF'; src: url('/assets/fonts/MapleMonoNerd.ttf') format('truetype'); @@ -6,11 +8,7 @@ font-display: swap; } -/* import base Forgejo theme so we only override what we need */ -@import "./theme-forgejo-auto.css"; - :root { /* prefer the Maple Mono Nerd Font for monospace usage */ --fonts-monospace: 'Maple Mono NF' !important; -} - +} \ No newline at end of file diff --git a/nix-system-configs/modules/system/forgejo.nix b/nix-system-configs/modules/system/forgejo.nix index c660db5..b02e2b0 100644 --- a/nix-system-configs/modules/system/forgejo.nix +++ b/nix-system-configs/modules/system/forgejo.nix @@ -84,6 +84,9 @@ in { # Forgejo configuration services.forgejo = { enable = true; + # Explicit custom directory where Forgejo will look for custom templates/assets + # Ensure this matches what systemd.tmpfiles will populate below. + customDir = "/var/lib/forgejo/custom"; database = { createDatabase = false; # Database already created, DO NOT REMOVE THIS OR IT WILL DEFAULT INTO INTERNAL ONE type = "postgres"; @@ -126,6 +129,8 @@ in { systemd.tmpfiles.rules = [ "d '${config.services.forgejo.customDir}/templates' - forgejo forgejo - -" + # create the custom/templates/custom folder so header.tmpl can live under templates/custom + "d '${config.services.forgejo.customDir}/templates/custom' - forgejo forgejo - -" "d '${config.services.forgejo.customDir}/public' - forgejo forgejo - -" "d '${config.services.forgejo.customDir}/public/assets' - forgejo forgejo - -" "d '${config.services.forgejo.customDir}/public/assets/css' - forgejo forgejo - -" @@ -139,6 +144,10 @@ in { "C+ '${config.services.forgejo.customDir}/templates/home.tmpl' - forgejo forgejo - ${ ../styling/forgejo/home.tmpl }" + # copy a small header.tmpl into templates/custom so we can force-include custom CSS into the + "C+ '${config.services.forgejo.customDir}/templates/custom/header.tmpl' - forgejo forgejo - ${ + ../styling/forgejo/header.tmpl + }" ]; # Open ports in the firewall. From 59dac432d972e02f497aba9ad6c7622c82269918 Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Thu, 12 Feb 2026 23:07:43 +0100 Subject: [PATCH 07/13] CSS my beloathed. --- nix-system-configs/modules/styling/forgejo/home.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix-system-configs/modules/styling/forgejo/home.tmpl b/nix-system-configs/modules/styling/forgejo/home.tmpl index 0a4b2fc..8516f3a 100644 --- a/nix-system-configs/modules/styling/forgejo/home.tmpl +++ b/nix-system-configs/modules/styling/forgejo/home.tmpl @@ -1,5 +1,5 @@ [[:Template:Template "base/head" .]] -
+
From 45bd2e975fece96de61c556a07c940043b9fd663 Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Thu, 12 Feb 2026 23:20:45 +0100 Subject: [PATCH 08/13] CSS my beloathed. UGHH --- .../modules/styling/forgejo/header.tmpl | 16 ++++++++++++++-- .../modules/styling/forgejo/home.tmpl | 6 +++--- .../modules/styling/forgejo/theme-custom.css | 1 - nix-system-configs/modules/system/forgejo.nix | 10 +++------- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/nix-system-configs/modules/styling/forgejo/header.tmpl b/nix-system-configs/modules/styling/forgejo/header.tmpl index 241df9e..3f563b3 100644 --- a/nix-system-configs/modules/styling/forgejo/header.tmpl +++ b/nix-system-configs/modules/styling/forgejo/header.tmpl @@ -1,2 +1,14 @@ -{{/* This will be injected into via $FORGEJO_CUSTOM/templates/custom/header.tmpl */}} - +{{/* Custom header content - inject custom fonts that apply to all themes */}} + diff --git a/nix-system-configs/modules/styling/forgejo/home.tmpl b/nix-system-configs/modules/styling/forgejo/home.tmpl index 8516f3a..1f5db13 100644 --- a/nix-system-configs/modules/styling/forgejo/home.tmpl +++ b/nix-system-configs/modules/styling/forgejo/home.tmpl @@ -1,5 +1,5 @@ -[[:Template:Template "base/head" .]] -
+{{template "base/head" .}} +
@@ -10,4 +10,4 @@
-[[:Template:Template "base/footer" .]] \ No newline at end of file +{{template "base/footer" .}} diff --git a/nix-system-configs/modules/styling/forgejo/theme-custom.css b/nix-system-configs/modules/styling/forgejo/theme-custom.css index 7c12ccd..f3fa8d3 100644 --- a/nix-system-configs/modules/styling/forgejo/theme-custom.css +++ b/nix-system-configs/modules/styling/forgejo/theme-custom.css @@ -1,4 +1,3 @@ -@import "./theme-forgejo-auto.css"; @font-face { font-family: 'Maple Mono NF'; diff --git a/nix-system-configs/modules/system/forgejo.nix b/nix-system-configs/modules/system/forgejo.nix index b02e2b0..692c962 100644 --- a/nix-system-configs/modules/system/forgejo.nix +++ b/nix-system-configs/modules/system/forgejo.nix @@ -122,8 +122,8 @@ in { }; settings.ui = { - DEFAULT_THEME = "custom"; - THEMES = "forgejo-auto,forgejo-light,forgejo-dark,custom"; + DEFAULT_THEME = "forgejo-auto"; + THEMES = "forgejo-auto,forgejo-light,forgejo-dark"; }; }; @@ -133,18 +133,14 @@ in { "d '${config.services.forgejo.customDir}/templates/custom' - forgejo forgejo - -" "d '${config.services.forgejo.customDir}/public' - forgejo forgejo - -" "d '${config.services.forgejo.customDir}/public/assets' - forgejo forgejo - -" - "d '${config.services.forgejo.customDir}/public/assets/css' - forgejo forgejo - -" # ensure fonts directory exists "d '${config.services.forgejo.customDir}/public/assets/fonts' - forgejo forgejo - -" # install the TTF from the Nix store into the Forgejo customDir "C+ '${config.services.forgejo.customDir}/public/assets/fonts/MapleMonoNerd.ttf' - forgejo forgejo - ${mapleFonts}/fonts/MapleMonoNerd.ttf" - "C+ '${config.services.forgejo.customDir}/public/assets/css/theme-custom.css' - forgejo forgejo - ${ - ../styling/forgejo/theme-custom.css - }" "C+ '${config.services.forgejo.customDir}/templates/home.tmpl' - forgejo forgejo - ${ ../styling/forgejo/home.tmpl }" - # copy a small header.tmpl into templates/custom so we can force-include custom CSS into the + # copy header.tmpl into templates/custom so we can inject custom CSS into the "C+ '${config.services.forgejo.customDir}/templates/custom/header.tmpl' - forgejo forgejo - ${ ../styling/forgejo/header.tmpl }" From b8daeea20540cebe59693d05b67535021005df5a Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Thu, 12 Feb 2026 23:36:13 +0100 Subject: [PATCH 09/13] Almost working... --- nix-system-configs/modules/styling/forgejo/theme-custom.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nix-system-configs/modules/styling/forgejo/theme-custom.css b/nix-system-configs/modules/styling/forgejo/theme-custom.css index f3fa8d3..ff5554f 100644 --- a/nix-system-configs/modules/styling/forgejo/theme-custom.css +++ b/nix-system-configs/modules/styling/forgejo/theme-custom.css @@ -7,6 +7,9 @@ font-display: swap; } +/* import base Forgejo theme so we only override what we need */ +@import "./theme-forgejo-auto.css"; + :root { /* prefer the Maple Mono Nerd Font for monospace usage */ --fonts-monospace: 'Maple Mono NF' !important; From b8d8cc34ce56db7fb707c057a9d9490482c1a86c Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Thu, 12 Feb 2026 23:42:45 +0100 Subject: [PATCH 10/13] Work please work. --- nix-system-configs/modules/styling/forgejo/header.tmpl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix-system-configs/modules/styling/forgejo/header.tmpl b/nix-system-configs/modules/styling/forgejo/header.tmpl index 3f563b3..425ddb0 100644 --- a/nix-system-configs/modules/styling/forgejo/header.tmpl +++ b/nix-system-configs/modules/styling/forgejo/header.tmpl @@ -11,4 +11,8 @@ :root { --fonts-monospace: 'Maple Mono NF' !important; } + +code, pre, kbd, tt, samp, .ui code, .ui pre, .monospace { + font-family: 'Maple Mono NF', ui-monospace, SFMono-Regular, Menlo, Monaco, "Segoe UI Mono", Roboto Mono, "Courier New", monospace !important; +} From e2a8420dced7d2584e363a1088b772d0b0fe07d3 Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Thu, 12 Feb 2026 23:49:08 +0100 Subject: [PATCH 11/13] I don't like CSS... weh --- nix-system-configs/modules/styling/forgejo/header.tmpl | 3 +++ nix-system-configs/modules/system/forgejo.nix | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/nix-system-configs/modules/styling/forgejo/header.tmpl b/nix-system-configs/modules/styling/forgejo/header.tmpl index 425ddb0..007fdb6 100644 --- a/nix-system-configs/modules/styling/forgejo/header.tmpl +++ b/nix-system-configs/modules/styling/forgejo/header.tmpl @@ -16,3 +16,6 @@ code, pre, kbd, tt, samp, .ui code, .ui pre, .monospace { font-family: 'Maple Mono NF', ui-monospace, SFMono-Regular, Menlo, Monaco, "Segoe UI Mono", Roboto Mono, "Courier New", monospace !important; } + + + diff --git a/nix-system-configs/modules/system/forgejo.nix b/nix-system-configs/modules/system/forgejo.nix index 692c962..1b523a4 100644 --- a/nix-system-configs/modules/system/forgejo.nix +++ b/nix-system-configs/modules/system/forgejo.nix @@ -135,6 +135,8 @@ in { "d '${config.services.forgejo.customDir}/public/assets' - forgejo forgejo - -" # ensure fonts directory exists "d '${config.services.forgejo.customDir}/public/assets/fonts' - forgejo forgejo - -" + # ensure css directory exists so we can place theme css + "d '${config.services.forgejo.customDir}/public/assets/css' - forgejo forgejo - -" # install the TTF from the Nix store into the Forgejo customDir "C+ '${config.services.forgejo.customDir}/public/assets/fonts/MapleMonoNerd.ttf' - forgejo forgejo - ${mapleFonts}/fonts/MapleMonoNerd.ttf" "C+ '${config.services.forgejo.customDir}/templates/home.tmpl' - forgejo forgejo - ${ @@ -144,6 +146,10 @@ in { "C+ '${config.services.forgejo.customDir}/templates/custom/header.tmpl' - forgejo forgejo - ${ ../styling/forgejo/header.tmpl }" + # copy your theme CSS into the public assets so Forgejo serves it directly + "C+ '${config.services.forgejo.customDir}/public/assets/css/theme-custom.css' - forgejo forgejo - ${ + ../styling/forgejo/theme-custom.css + }" ]; # Open ports in the firewall. From 4c393a7f926175b28a896114eb08c7384475c873 Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Thu, 12 Feb 2026 23:56:49 +0100 Subject: [PATCH 12/13] I fucking hate NixOS wiki sometimes. --- nix-system-configs/modules/system/forgejo.nix | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/nix-system-configs/modules/system/forgejo.nix b/nix-system-configs/modules/system/forgejo.nix index 1b523a4..a8a8b3c 100644 --- a/nix-system-configs/modules/system/forgejo.nix +++ b/nix-system-configs/modules/system/forgejo.nix @@ -152,6 +152,27 @@ in { }" ]; + # Fallback: one-shot systemd service to copy custom assets on activation (works even if tmpfiles isn't applied or for live testing) + systemd.services."forgejo-custom-files" = { + description = "Install Forgejo custom templates and assets into customDir"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + Type = "oneshot"; + # Use bash -c to run a compact copy/install script that ensures dirs exist and files are owned by forgejo + ExecStart = ''${pkgs.bash}/bin/bash -c "set -eu; \ + install -d -m0755 -o forgejo -g forgejo ${config.services.forgejo.customDir}/public/assets/fonts; \ + install -d -m0755 -o forgejo -g forgejo ${config.services.forgejo.customDir}/public/assets/css; \ + install -d -m0755 -o forgejo -g forgejo ${config.services.forgejo.customDir}/templates/custom; \ + cp -a ${mapleFonts}/fonts/MapleMonoNerd.ttf ${config.services.forgejo.customDir}/public/assets/fonts/MapleMonoNerd.ttf; \ + cp -a ${toString ../styling/forgejo/header.tmpl} ${config.services.forgejo.customDir}/templates/custom/header.tmpl; \ + cp -a ${toString ../styling/forgejo/home.tmpl} ${config.services.forgejo.customDir}/templates/home.tmpl; \ + cp -a ${toString ../styling/forgejo/theme-custom.css} ${config.services.forgejo.customDir}/public/assets/css/theme-custom.css; \ + chown -R forgejo:forgejo ${config.services.forgejo.customDir}"''; + }; + wantedBy = [ "multi-user.target" ]; + }; + # Open ports in the firewall. networking.firewall.allowedTCPPorts = [3000]; From 64b55201709ccd117eb7417f53cbe7becb67d739 Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Thu, 12 Feb 2026 23:57:24 +0100 Subject: [PATCH 13/13] Typo. --- nix-system-configs/modules/system/forgejo.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nix-system-configs/modules/system/forgejo.nix b/nix-system-configs/modules/system/forgejo.nix index a8a8b3c..0108c14 100644 --- a/nix-system-configs/modules/system/forgejo.nix +++ b/nix-system-configs/modules/system/forgejo.nix @@ -156,7 +156,6 @@ in { systemd.services."forgejo-custom-files" = { description = "Install Forgejo custom templates and assets into customDir"; after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; serviceConfig = { Type = "oneshot"; # Use bash -c to run a compact copy/install script that ensures dirs exist and files are owned by forgejo