New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gitea module: init at 1.1.3 #28851
gitea module: init at 1.1.3 #28851
Conversation
''; | ||
|
||
systemd.services.gitea = { | ||
description = "Gitea (Go Git Service)"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Gitea"
is enough here. Reason: on boot it will show the description
as name:
Something like:
Starting Gitea...
password = mkOption { | ||
type = types.str; | ||
default = ""; | ||
description = "Database password."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be an option to store this in a external file. Explanation: #24288
|
||
system.activationScripts.gitea = '' | ||
mkdir -p ${cfg.stateDir} | ||
chown -R ${cfg.user}:${cfg.group} ${cfg.stateDir} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be an expensive operation (if a lot git repositories are present). Since you have allocated static uid/gid number, please only change permission of the root state directory:
install -d -g ${cfg.group} -o ${cfg.user} ${cfg.stateDir}
touch ${cfg.stateDir}/.db-created | ||
fi | ||
''} | ||
chown -R ${cfg.user}:${cfg.group} ${cfg.stateDir} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you chown
again. I would remove activationsScripts
and create stateDir
at the beginning of preStart
.
@disassembler has added |
Motivation for this change
As Gogs has been forked to Gitea I wanted to be able to run gitea.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)