Compare commits

...

2 Commits

1 changed files with 35 additions and 5 deletions

View File

@ -130,10 +130,6 @@ ACTION=="add", SUBSYSTEM=="tty", \
]; ];
services.hydra = { services.hydra = {
enable = true; enable = true;
package = pkgs.hydra.overrideAttrs(oa: {
patches = oa.patches ++ [ ./hydra-conda.patch ./hydra-retry.patch ];
hydraPath = oa.hydraPath + ":" + pkgs.lib.makeBinPath [ pkgs.jq ];
});
useSubstitutes = true; useSubstitutes = true;
hydraURL = "https://nixbld.m-labs.hk"; hydraURL = "https://nixbld.m-labs.hk";
notificationSender = "hydra@m-labs.hk"; notificationSender = "hydra@m-labs.hk";
@ -200,7 +196,13 @@ ACTION=="add", SUBSYSTEM=="tty", \
}; };
nixpkgs.config.packageOverrides = super: let self = super.pkgs; in { nixpkgs.config.packageOverrides = super: let self = super.pkgs; in {
matterbridge = super.matterbridge.overrideAttrs(oa: { patches = [ ./matterbridge-disable-github.patch ]; }); hydra = super.hydra.overrideAttrs(oa: {
patches = oa.patches ++ [ ./hydra-conda.patch ./hydra-retry.patch ];
hydraPath = oa.hydraPath + ":" + super.lib.makeBinPath [ super.jq ];
});
matterbridge = super.matterbridge.overrideAttrs(oa: {
patches = [ ./matterbridge-disable-github.patch ];
});
}; };
security.acme.certs = { security.acme.certs = {
@ -213,6 +215,7 @@ ACTION=="add", SUBSYSTEM=="tty", \
"git.m-labs.hk" = null; "git.m-labs.hk" = null;
"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;
}; };
}; };
}; };
@ -268,6 +271,19 @@ ACTION=="add", SUBSYSTEM=="tty", \
uwsgi_pass unix:${config.services.uwsgi.runDir}/uwsgi.sock; uwsgi_pass unix:${config.services.uwsgi.runDir}/uwsgi.sock;
''; '';
}; };
"forum.m-labs.hk" = {
forceSSL = true;
useACMEHost = "nixbld.m-labs.hk";
root = "/var/www/flarum/public";
locations."~ \.php$".extraConfig = ''
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
'';
extraConfig = ''
index index.php;
include /var/www/flarum/.nginx.conf;
'';
};
}; };
}; };
services.uwsgi = { services.uwsgi = {
@ -280,6 +296,20 @@ ACTION=="add", SUBSYSTEM=="tty", \
}; };
}; };
}; };
services.mysql = {
enable = true;
package = pkgs.mariadb;
};
services.phpfpm.poolConfigs.mypool = ''
listen = 127.0.0.1:9000
user = nobody
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.max_requests = 500
'';
services.homu = { services.homu = {
enable = true; enable = true;