nixbld: add openhardware.hk site

This commit is contained in:
Sebastien Bourdeauducq 2019-10-09 21:33:37 +08:00
parent a85a16ff73
commit c0c9af04d4

View File

@ -310,6 +310,9 @@ ACTION=="add", SUBSYSTEM=="tty", \
"chat.m-labs.hk" = null; "chat.m-labs.hk" = null;
"hooks.m-labs.hk" = null; "hooks.m-labs.hk" = null;
"forum.m-labs.hk" = null; "forum.m-labs.hk" = null;
"openhardware.hk" = null;
"git.openhardware.hk" = null;
}; };
}; };
}; };
@ -439,6 +442,15 @@ ACTION=="add", SUBSYSTEM=="tty", \
include /var/www/flarum/.nginx.conf; include /var/www/flarum/.nginx.conf;
''; '';
}; };
"git.openhardware.hk" = {
forceSSL = true;
useACMEHost = "nixbld.m-labs.hk";
locations."/".proxyPass = "http://127.0.0.1:3002";
extraConfig = ''
client_max_body_size 300M;
'';
};
}; };
}; };
services.uwsgi = { services.uwsgi = {
@ -489,6 +501,27 @@ ACTION=="add", SUBSYSTEM=="tty", \
"mail.nmigen.org" = null; "mail.nmigen.org" = null;
}; };
containers.openhardwarehk = {
autoStart = true;
config =
{ config, pkgs, ... }:
{
services.gitea = {
enable = true;
httpPort = 3002;
rootUrl = "https://git.openhardware.hk/";
appName = "Open Hardware HK";
cookieSecure = true;
disableRegistration = true;
extraConfig =
''
[attachment]
ALLOWED_TYPES = */*
'';
};
};
};
# This value determines the NixOS release with which your system is to be # This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database # compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you # servers. You should change this only after NixOS release notes say you