2024-04-19 20:44:42 +00:00
|
|
|
{pkgs, ...}: let
|
2024-03-29 20:56:26 +00:00
|
|
|
port = 3000;
|
2024-01-25 15:54:05 +00:00
|
|
|
in {
|
|
|
|
services = {
|
2024-03-29 20:56:26 +00:00
|
|
|
forgejo = {
|
2024-01-25 15:54:05 +00:00
|
|
|
enable = true;
|
2024-04-19 18:15:04 +00:00
|
|
|
package = pkgs.unstable.forgejo;
|
2024-03-29 20:56:26 +00:00
|
|
|
settings = {
|
|
|
|
DEFAULT = {
|
|
|
|
APP_NAME = "buffet's kitchen";
|
|
|
|
};
|
|
|
|
|
|
|
|
server = {
|
|
|
|
DOMAIN = "buffets.kitchen";
|
2024-04-19 18:15:04 +00:00
|
|
|
ROOT_URL = "https://buffets.kitchen/";
|
2024-03-29 20:56:26 +00:00
|
|
|
HTTP_PORT = port;
|
|
|
|
};
|
|
|
|
|
|
|
|
service.DISABLE_REGISTRATION = true;
|
|
|
|
cron.ENABLED = true;
|
|
|
|
federation.ENABLED = true;
|
2024-01-25 15:54:05 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nginx = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
|
2024-03-29 20:56:26 +00:00
|
|
|
virtualHosts."buffets.kitchen" = {
|
2024-04-20 16:41:52 +00:00
|
|
|
useACMEHost = "buffet.sh";
|
2024-01-25 15:54:05 +00:00
|
|
|
forceSSL = true;
|
|
|
|
|
2024-04-20 16:42:27 +00:00
|
|
|
locations."= /" = {
|
|
|
|
extraConfig = ''
|
|
|
|
return 301 https://$host/chef;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-01-25 15:54:05 +00:00
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://localhost:${toString port}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|