This commit is contained in:
Reid 2024-11-01 19:54:26 -07:00
parent 1a53db8ce1
commit 91509baa59
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
6 changed files with 82 additions and 24 deletions

View file

@ -3,12 +3,6 @@
with lib;
let
cfg = config.modules.services.forgejo;
theme = pkgs.fetchzip {
url = "https://github.com/catppuccin/gitea/releases/download/v0.4.1/catppuccin-gitea.tar.gz";
sha256 = "1wi4gi431b8hpmk6cr05jygplj76p6jwwlihajxz9131aqxym1fp";
stripRoot = false;
};
in {
options.modules.services.forgejo = {
enable = mkEnableOption "enable forgejo, a lightweight git server";
@ -37,15 +31,6 @@ in {
PASSWORD_HASH_ALGO = "argon2";
PASSWORD_CHECK_PWN = true;
};
"ui" = {
THEMES =
builtins.concatStringsSep
","
(["auto"]
++ (map (name: removePrefix "theme-" (removeSuffix ".css" name))
(attrNames (builtins.readDir theme))));
DEFAULT_THEME = "catppuccin-mocha-red";
};
"ui.meta" = {
AUTHOR = "reidlab";
DESCRIPTION = "reidlab's git instance";
@ -83,13 +68,5 @@ in {
'';
};
};
systemd.services.forgejo = {
preStart = mkAfter ''
rm -rf ${config.services.forgejo.customDir}/public/assets
mkdir -p ${config.services.forgejo.customDir}/public/assets
ln -sf ${theme} ${config.services.forgejo.customDir}/public/assets/css
'';
};
};
}