diff --git a/hosts/kommode/services/gitea/customization/default.nix b/hosts/kommode/services/gitea/customization/default.nix index 0bbd8dc..71fb285 100644 --- a/hosts/kommode/services/gitea/customization/default.nix +++ b/hosts/kommode/services/gitea/customization/default.nix @@ -38,6 +38,10 @@ in # 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" + + # Show license in list view + patch -i ${./licenses-in-repo-list.diff} "${cfg.package.src}/templates/explore/repo_list.tmpl" -o repo_list.tmpl + install -Dm444 repo_list.tmpl "$out/explore/repo_list.tmpl" ''; in '' install -Dm444 ${logo-svg} ${cfg.customDir}/public/assets/img/logo.svg diff --git a/hosts/kommode/services/gitea/customization/licenses-in-repo-list.diff b/hosts/kommode/services/gitea/customization/licenses-in-repo-list.diff new file mode 100644 index 0000000..627e412 --- /dev/null +++ b/hosts/kommode/services/gitea/customization/licenses-in-repo-list.diff @@ -0,0 +1,6 @@ +33a34,38 +> {{if .DetectedRepoLicenses}} +> +> {{svg "octicon-law"}} {{if eq (len .DetectedRepoLicenses) 1}}{{index .DetectedRepoLicenses 0}}{{else}}{{ctx.Locale.Tr "repo.multiple_licenses"}}{{end}} +> +> {{end}}