2024-11-26 08:40:00 +00:00
|
|
|
{ config, lib, ... }:
|
|
|
|
|
2024-12-10 21:40:33 +00:00
|
|
|
with lib;
|
|
|
|
|
2024-12-15 23:13:11 +00:00
|
|
|
let
|
|
|
|
port = 2222;
|
|
|
|
in
|
2024-11-26 08:40:00 +00:00
|
|
|
{
|
2024-12-10 21:40:33 +00:00
|
|
|
options.features.homelab.gitea.enable = mkEnableOption "Enable gitea";
|
2024-11-26 08:40:00 +00:00
|
|
|
|
2024-12-10 21:40:33 +00:00
|
|
|
config = mkIf config.features.homelab.gitea.enable {
|
2024-12-15 23:13:11 +00:00
|
|
|
services = {
|
|
|
|
gitea = {
|
|
|
|
enable = true;
|
|
|
|
group = "media";
|
|
|
|
stateDir = "/mnt/media/gitea";
|
2024-11-26 08:40:00 +00:00
|
|
|
|
2024-12-15 23:13:11 +00:00
|
|
|
settings = {
|
|
|
|
server = {
|
|
|
|
HTTP_PORT = port;
|
|
|
|
};
|
2024-11-26 08:40:00 +00:00
|
|
|
|
2024-12-15 23:13:11 +00:00
|
|
|
service = {
|
|
|
|
DISABLE_REGISTRATION = true;
|
|
|
|
};
|
2024-11-26 08:40:00 +00:00
|
|
|
};
|
|
|
|
};
|
2024-12-15 23:13:11 +00:00
|
|
|
|
|
|
|
nginx = {
|
|
|
|
enable = true;
|
|
|
|
|
2024-12-26 21:35:05 +00:00
|
|
|
virtualHosts."gitea.oliverdavies.uk".locations."/".proxyPass = "http://localhost:${toString port}/";
|
2024-12-15 23:13:11 +00:00
|
|
|
};
|
2024-11-26 08:40:00 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|