l prism.r: add c.r cyberlocker

This commit is contained in:
lassulus 2021-08-25 12:05:18 +02:00
parent f01a67acc1
commit bb846b5ca9
2 changed files with 19 additions and 0 deletions

View File

@ -67,6 +67,7 @@ in {
"cgit.prism.r" "cgit.prism.r"
"flix.r" "flix.r"
"paste.r" "paste.r"
"c.r"
"p.r" "p.r"
"search.r" "search.r"
]; ];

View File

@ -2,6 +2,18 @@
with import <stockholm/lib>; with import <stockholm/lib>;
{ {
services.nginx.virtualHosts.cyberlocker = {
serverAliases = [ "c.r" ];
locations."/".extraConfig = ''
client_max_body_size 4G;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:${toString config.krebs.htgen.cyberlocker.port};
'';
extraConfig = ''
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
'';
};
services.nginx.virtualHosts.paste = { services.nginx.virtualHosts.paste = {
serverAliases = [ "p.r" ]; serverAliases = [ "p.r" ];
locations."/".extraConfig = '' locations."/".extraConfig = ''
@ -58,6 +70,12 @@ with import <stockholm/lib>;
(. ${pkgs.htgen-imgur}/bin/htgen-imgur) (. ${pkgs.htgen-imgur}/bin/htgen-imgur)
''; '';
}; };
krebs.htgen.cyberlocker = {
port = 7772;
script = /* sh */ ''
(. ${pkgs.htgen-cyberlocker}/bin/htgen-cyberlocker)
'';
};
krebs.iptables.tables.filter.INPUT.rules = [ krebs.iptables.tables.filter.INPUT.rules = [
{ predicate = "-i retiolum -p tcp --dport 80"; target = "ACCEPT";} { predicate = "-i retiolum -p tcp --dport 80"; target = "ACCEPT";}
]; ];