forgejo -> gitea, general documentation changes, build hack

This commit is contained in:
Reid 2024-03-03 22:20:06 -08:00
parent 106c5c3ad7
commit c9be231c9f
5 changed files with 27 additions and 28 deletions

View file

@ -20,24 +20,18 @@ in {
type = types.int;
default = 3000;
};
package = mkOption {
type = types.package;
default = pkgs.forgejo;
};
};
config = mkIf cfg.enable {
services = {
gitea = {
forgejo = {
enable = true;
package = cfg.package;
stateDir = "/var/lib/${cfg.domain}";
appName = "reidlab's git instance";
database = {
type = "postgres";
name = "gitea";
};
database.type = "postgres";
settings = {
"DEFAULT" = {
APP_NAME = "reidlab's git instance";
};
"security" = {
INSTALL_LOCK = true;
PASSWORD_HASH_ALGO = "argon2";
@ -90,11 +84,11 @@ in {
};
};
systemd.services.gitea = {
systemd.services.forgejo = {
preStart = mkAfter ''
rm -rf ${config.services.gitea.customDir}/public/assets
mkdir -p ${config.services.gitea.customDir}/public/assets
ln -sf ${theme} ${config.services.gitea.customDir}/public/assets/css
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
'';
};
};