forgejo, outline
This commit is contained in:
parent
365e1dcddb
commit
d3cb19d6f1
2 changed files with 94 additions and 10 deletions
76
system/web-server/forgejo.nix
Normal file
76
system/web-server/forgejo.nix
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
{ lib, pkgs, config, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.services.forgejo;
|
||||||
|
srv = cfg.settings.server;
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
security.acme.certs."${config.networking.domain}".extraDomainNames = [
|
||||||
|
"outline.${config.networking.domain}"
|
||||||
|
];
|
||||||
|
|
||||||
|
services.nginx = {
|
||||||
|
virtualHosts.${cfg.settings.server.DOMAIN} = {
|
||||||
|
forceSSL = true;
|
||||||
|
useACMEHost = config.networking.domain;
|
||||||
|
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
|
||||||
|
extraConfig = ''
|
||||||
|
client_max_body_size 512M;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.forgejo = {
|
||||||
|
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
database.type = "postgres";
|
||||||
|
lfs.enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
|
||||||
|
server = {
|
||||||
|
DOMAIN = "git.${config.networking.domain}";
|
||||||
|
# You need to specify this to remove the port from URLs in the web UI.
|
||||||
|
ROOT_URL = "https://${srv.DOMAIN}/";
|
||||||
|
HTTP_PORT = 3000;
|
||||||
|
};
|
||||||
|
|
||||||
|
# You can temporarily allow registration to create an admin user.
|
||||||
|
# service.DISABLE_REGISTRATION = true;
|
||||||
|
# Add support for actions, based on act: https://github.com/nektos/act
|
||||||
|
|
||||||
|
actions = {
|
||||||
|
ENABLED = true;
|
||||||
|
DEFAULT_ACTIONS_URL = "github";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Sending emails is completely optional
|
||||||
|
# You can send a test email from the web UI at:
|
||||||
|
# Profile Picture > Site Administration > Configuration > Mailer Configuration
|
||||||
|
|
||||||
|
mailer = {
|
||||||
|
ENABLED = true;
|
||||||
|
SMTP_ADDR = "localhost";
|
||||||
|
FROM = "git@${config.networking.domain}";
|
||||||
|
# USER = "git@ktiu.net";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# secrets = {
|
||||||
|
# mailer.PASSWD = config.age.secrets.forgejo-mailer-password.path;
|
||||||
|
# };
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# age.secrets.forgejo-mailer-password = {
|
||||||
|
# file = ../secrets/forgejo-mailer-password.age;
|
||||||
|
# mode = "400";
|
||||||
|
# owner = "forgejo";
|
||||||
|
# };
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,24 +1,32 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
let
|
{
|
||||||
|
|
||||||
outline = {
|
# environment.systemPackages = with pkgs; [
|
||||||
hostname = "outline.${config.networking.domain}";
|
# openssl
|
||||||
mail = "outline@${config.networking.domain}";
|
# ];
|
||||||
};
|
|
||||||
|
|
||||||
in {
|
|
||||||
|
|
||||||
services.outline = {
|
services.outline = {
|
||||||
|
|
||||||
enable = true;
|
enable = true;
|
||||||
publicUrl = "https://${outline.hostname}";
|
publicUrl = "https://outline.${config.networking.domain}";
|
||||||
storage.storageType = "local";
|
|
||||||
defaultLanguage = "de_DE";
|
defaultLanguage = "de_DE";
|
||||||
|
storage.storageType = "local";
|
||||||
|
|
||||||
|
# smtp = {
|
||||||
|
# username = "kein_schlussstrich_hessen@systemli.org";
|
||||||
|
# passwordFile = "/var/custom-access/outline-smtp-password.txt";
|
||||||
|
# fromEmail = "kein_schlussstrich_hessen@systemli.org";
|
||||||
|
# replyEmail = config.services.outline.smtp.fromEmail;
|
||||||
|
# host = "mail.systemli.org";
|
||||||
|
# # secure = false;
|
||||||
|
# port = 465;
|
||||||
|
# };
|
||||||
|
|
||||||
smtp = {
|
smtp = {
|
||||||
username = "outline";
|
username = "outline";
|
||||||
passwordFile = "/dev/null";
|
passwordFile = "/dev/null";
|
||||||
fromEmail = outline.mail;
|
fromEmail = "outline@${config.networking.domain}";
|
||||||
replyEmail = config.services.outline.smtp.fromEmail;
|
replyEmail = config.services.outline.smtp.fromEmail;
|
||||||
host = "localhost";
|
host = "localhost";
|
||||||
secure = false;
|
secure = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue