bekkalokk/gitea: use systemd unit for gitea customization
Eval nix flake / evals (push) Failing after 1m52s Details
Eval nix flake / evals (pull_request) Failing after 1m52s Details

This commit is contained in:
Oystein Kristoffer Tveit 2024-04-11 21:47:47 +02:00
parent 5bed292a01
commit 4b197d0418
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
1 changed files with 25 additions and 12 deletions

View File

@ -46,12 +46,9 @@ in {
ENABLE_FEDERATED_AVATAR = false;
};
actions.ENABLED = true;
"ui.meta".DESCRIPTION = "Bokstavelig talt programvareverkstedet";
};
};
services.gitea-themes.monokai = pkgs.gitea-theme-monokai;
environment.systemPackages = [ cfg.package ];
services.nginx.virtualHosts."${domain}" = {
@ -68,12 +65,28 @@ in {
networking.firewall.allowedTCPPorts = [ sshPort ];
system.activationScripts.linkGiteaLogo.text = let
# Extra customization
services.gitea-themes.monokai = pkgs.gitea-theme-monokai;
systemd.services.install-gitea-customization = {
description = "Install extra customization in gitea's CUSTOM_DIR";
wantedBy = [ "gitea.service" ];
requiredBy = [ "gitea.service" ];
serviceConfig = {
Type = "oneshot";
User = cfg.user;
Group = cfg.group;
};
script = let
logo-svg = ../../../../assets/logo_blue_regular.svg;
logo-png = ../../../../assets/logo_blue_regular.png;
in ''
install -Dm444 ${logo-svg} ${cfg.stateDir}/custom/public/img/logo.svg
install -Dm444 ${logo-png} ${cfg.stateDir}/custom/public/img/logo.png
install -Dm444 ${./loading.apng} ${cfg.stateDir}/custom/public/img/loading.png
install -Dm444 ${logo-svg} ${cfg.customDir}/public/img/logo.svg
install -Dm444 ${logo-png} ${cfg.customDir}/public/img/logo.png
install -Dm444 ${./loading.apng} ${cfg.customDir}/public/img/loading.png
'';
};
}