@ -5,7 +5,7 @@ in
|
|||||||
{
|
{
|
||||||
services.gitea-themes.monokai = pkgs.gitea-theme-monokai;
|
services.gitea-themes.monokai = pkgs.gitea-theme-monokai;
|
||||||
|
|
||||||
systemd.services.install-gitea-customization = lib.mkIf cfg.enable {
|
systemd.services.gitea-customization = lib.mkIf cfg.enable {
|
||||||
description = "Install extra customization in gitea's CUSTOM_DIR";
|
description = "Install extra customization in gitea's CUSTOM_DIR";
|
||||||
wantedBy = [ "gitea.service" ];
|
wantedBy = [ "gitea.service" ];
|
||||||
requiredBy = [ "gitea.service" ];
|
requiredBy = [ "gitea.service" ];
|
||||||
@ -28,12 +28,25 @@ in
|
|||||||
project-labels = (pkgs.formats.yaml { }).generate "gitea-project-labels.yaml" {
|
project-labels = (pkgs.formats.yaml { }).generate "gitea-project-labels.yaml" {
|
||||||
labels = lib.importJSON ./labels/projects.json;
|
labels = lib.importJSON ./labels/projects.json;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
customTemplates = pkgs.runCommandLocal "gitea-templates" {
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
coreutils
|
||||||
|
gnused
|
||||||
|
];
|
||||||
|
} ''
|
||||||
|
# Bigger icons
|
||||||
|
install -Dm444 "${cfg.package.src}/templates/repo/icon.tmpl" "$out/repo/icon.tmpl"
|
||||||
|
sed -i -e 's/24/48/g' "$out/repo/icon.tmpl"
|
||||||
|
'';
|
||||||
in ''
|
in ''
|
||||||
install -Dm444 ${logo-svg} ${cfg.customDir}/public/assets/img/logo.svg
|
install -Dm444 ${logo-svg} ${cfg.customDir}/public/assets/img/logo.svg
|
||||||
install -Dm444 ${logo-png} ${cfg.customDir}/public/assets/img/logo.png
|
install -Dm444 ${logo-png} ${cfg.customDir}/public/assets/img/logo.png
|
||||||
install -Dm444 ${./loading.apng} ${cfg.customDir}/public/assets/img/loading.png
|
install -Dm444 ${./loading.apng} ${cfg.customDir}/public/assets/img/loading.png
|
||||||
install -Dm444 ${extraLinks} ${cfg.customDir}/templates/custom/extra_links.tmpl
|
install -Dm444 ${extraLinks} ${cfg.customDir}/templates/custom/extra_links.tmpl
|
||||||
install -Dm444 ${project-labels} ${cfg.customDir}/options/label/project-labels.yaml
|
install -Dm444 ${project-labels} ${cfg.customDir}/options/label/project-labels.yaml
|
||||||
|
|
||||||
|
"${lib.getExe pkgs.rsync}" -a "${customTemplates}/" ${cfg.customDir}/templates/
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user