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 {
|
2024-05-06 11:10:52 +00:00
|
|
|
imports = [
|
|
|
|
./forgejo-runner.nix
|
|
|
|
];
|
2024-01-25 15:54:05 +00:00
|
|
|
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 = {
|
2024-05-02 10:50:47 +00:00
|
|
|
DEFAULT.APP_NAME = "buffet's kitchen";
|
|
|
|
admin.SEND_NOTIFICATION_EMAIL_ON_NEW_USER = true;
|
|
|
|
cron.ENABLED = true;
|
|
|
|
federation.ENABLED = true;
|
|
|
|
|
|
|
|
mailer = {
|
2024-05-03 08:22:21 +00:00
|
|
|
ENABLED = true;
|
2024-05-02 10:50:47 +00:00
|
|
|
PROTOCOL = "sendmail";
|
|
|
|
FROM = "buffet's kitchen <do-not-reply@buffets.kitchen>";
|
|
|
|
SENDMAIL_PATH = "${pkgs.system-sendmail}/bin/sendmail";
|
|
|
|
};
|
|
|
|
|
|
|
|
repository = {
|
|
|
|
ENABLE_PUSH_CREATE_USER = true;
|
|
|
|
ENABLE_PUSH_CREATE_ORG = true;
|
2024-03-29 20:56:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2024-05-02 10:50:47 +00:00
|
|
|
service = {
|
2024-05-03 08:35:28 +00:00
|
|
|
DISABLE_REGISTRATION = true;
|
2024-05-02 10:50:47 +00:00
|
|
|
ENABLE_NOTIFY_MAIL = true;
|
2024-05-01 13:33:06 +00:00
|
|
|
};
|
|
|
|
|
2024-05-01 12:33:48 +00:00
|
|
|
"markup.asciidoc" = {
|
|
|
|
ENABLED = true;
|
|
|
|
NEED_POSTPROCESS = true;
|
|
|
|
FILE_EXTENSIONS = ".adoc,.asciidoc";
|
|
|
|
RENDER_COMMAND = ''"${pkgs.asciidoctor}/bin/asciidoctor -e --safe-mode=secure -a showtitle --out-file=- -"'';
|
|
|
|
IS_INPUT_FILE = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
"markup.restructuredtext" = {
|
|
|
|
ENABLED = true;
|
|
|
|
NEED_POSTPROCESS = true;
|
|
|
|
FILE_EXTENSIONS = ".rst";
|
|
|
|
RENDER_COMMAND = ''"timeout 30s ${pkgs.pandoc}/bin/pandoc +RTS -M512M -RTS -f rst"'';
|
|
|
|
IS_INPUT_FILE = false;
|
|
|
|
};
|
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-05-03 09:05:32 +00:00
|
|
|
locations = {
|
|
|
|
"= /" = {
|
|
|
|
extraConfig = ''
|
2024-05-06 10:18:20 +00:00
|
|
|
return 303 https://$host/chef;
|
2024-05-03 09:05:32 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
"/" = {
|
|
|
|
proxyPass = "http://localhost:${toString port}";
|
|
|
|
};
|
|
|
|
|
|
|
|
"= /assets/img/logo.svg" = {
|
|
|
|
alias = ../../res/buffet_chef.png;
|
|
|
|
};
|
2024-04-20 16:42:27 +00:00
|
|
|
|
2024-05-03 09:05:32 +00:00
|
|
|
"= /assets/img/favicon.svg" = {
|
|
|
|
alias = ../../res/buffet_chef.png;
|
|
|
|
};
|
2024-01-25 15:54:05 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|