From 3c5120e7098aba353d4e8172c1e57723c133fa75 Mon Sep 17 00:00:00 2001 From: Nicholas McDaniel Date: Sun, 8 Feb 2026 21:49:20 -0500 Subject: [PATCH] Use alternative gitea theme --- modules/gitea.nix | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/modules/gitea.nix b/modules/gitea.nix index 8e6c3b4..e6c2296 100644 --- a/modules/gitea.nix +++ b/modules/gitea.nix @@ -1,4 +1,4 @@ -{config, ...}: +{pkgs, config, ...}: { services.gitea = { enable = true; @@ -14,6 +14,34 @@ actions = { ENABLED = false; }; + + ui = { + DEFAULT_THEME = "catppuccin-maroon-auto"; + THEMES = "catppuccin-maroon-auto,catppuccin-latte-maroon,catppuccin-mocha-maroon"; + }; }; }; + + systemd.tmpfiles.rules = + let catpuccinThemeSrc = + pkgs.fetchzip { + url = "https://github.com/catppuccin/gitea/releases/download/v1.0.2/catppuccin-gitea.tar.gz"; + sha256 = "sha256-rZHLORwLUfIFcB6K9yhrzr+UwdPNQVSadsw6rg8Q7gs="; + stripRoot = false; + }; + themeFiles = [ + "theme-catppuccin-mocha-maroon.css" + "theme-catppuccin-latte-maroon.css" + "theme-catppuccin-maroon-auto.css" + ]; + customDir = config.services.gitea.customDir; + in + [ + "d ${customDir}/public - gitea gitea -" + "d ${customDir}/public/assets - gitea gitea -" + "d ${customDir}/public/assets/css - gitea gitea -" + ] + ++ map (f: + "L+ ${customDir}/public/assets/css/${f} - - - - ${catpuccinThemeSrc}/${f}" + ) themeFiles; }