add forgejo
This commit is contained in:
parent
de1d958778
commit
91206fb3c0
4 changed files with 35 additions and 6 deletions
28
services/gitea.nix
Executable file
28
services/gitea.nix
Executable file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
systemd.services.gitea = {
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${lib.getExe pkgs.forgejo} -c /etc/gitea/config.ini";
|
||||
RemainAfterExit = true;
|
||||
Restart = "always";
|
||||
RestartMaxDelaySec = "1m";
|
||||
RestartSec = "100ms";
|
||||
RestartSteps = 9;
|
||||
User = "git";
|
||||
Group = "git";
|
||||
};
|
||||
wantedBy = ["multi-user.target"];
|
||||
};
|
||||
environment.etc."gitea/config.ini.default" = {
|
||||
text = ''
|
||||
WORK_PATH = /var/lib/git-server
|
||||
[server]
|
||||
HTTP_PORT = 8000
|
||||
'';
|
||||
mode = "644";
|
||||
};
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
systemd.services.rgit = {
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${rgit.packages.x86_64-linux.default}/bin/rgit -d /var/lib/git-server/.db/rgit-cache.db [::1]:3000 /var/lib/git-server";
|
||||
ExecStart = "${rgit.packages.x86_64-linux.default}/bin/rgit -d /var/lib/git-server/.db/rgit-cache.db [::1]:8000 /var/lib/git-server";
|
||||
RemainAfterExit = true;
|
||||
Restart = "always";
|
||||
RestartMaxDelay = "1m";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue