feat(forgejo): add option for custom forgejo theme

This commit is contained in:
Kiana Sheibani 2025-01-10 03:08:41 -05:00
parent 37f8be203f
commit 1d9e8d16d2
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
2 changed files with 13 additions and 1 deletions

View file

@ -41,7 +41,9 @@ in {
};
systemd.tmpfiles.rules =
lib.optional useSubdomain
lib.optional (!(builtins.isNull cfg.themes))
"L+ ${forgejo.stateDir}/custom/public/assets - - - - ${cfg.theme}"
++ lib.optional (!(builtins.isNull cfg.templates))
"L+ ${forgejo.stateDir}/custom/templates - - - - ${cfg.templates}";
}
// lib.mkIf cfg.createUser {

View file

@ -35,6 +35,16 @@ args@{ config, lib, ... }:
'';
};
theme = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
description = ''
A directory containing a custom Forgejo theme.
This directory should contain two subdirectories `css` and `img`.
'';
};
templates = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;