49 lines
1.2 KiB
Nix
Executable file
49 lines
1.2 KiB
Nix
Executable file
{ config, pkgs, lib, ... }:
|
|
|
|
{
|
|
services = {
|
|
nginx = {
|
|
enable = true;
|
|
package = pkgs.nginxQuic;
|
|
recommendedProxySettings = true;
|
|
recommendedTlsSettings = true;
|
|
recommendedZstdSettings = true;
|
|
recommendedGzipSettings = true;
|
|
recommendedBrotliSettings = true;
|
|
recommendedOptimisation = true;
|
|
defaultMimeTypes = ../../../../modules/packages/nginx/mime.types;
|
|
appendConfig = ''
|
|
worker_processes 16;
|
|
'';
|
|
eventsConfig = ''
|
|
#use kqueue;
|
|
worker_connections 512;
|
|
'';
|
|
appendHttpConfig = ''
|
|
#sendfile on;
|
|
disable_symlinks off;
|
|
'';
|
|
upstreams = import ./matrix-upstreams.nix;
|
|
additionalModules = with pkgs.nginxModules; [
|
|
moreheaders
|
|
];
|
|
virtualHosts = {
|
|
#matrix...
|
|
"matrix.litenet.tel" = import ./litenet.tel/matrix.nix;
|
|
"matrix.localhost" = import ./localhost/matrix.nix;
|
|
};
|
|
};
|
|
};
|
|
systemd.services.nginx.serviceConfig = {
|
|
LimitNOFILE=5000000;
|
|
};
|
|
# systemd.services.nginx.requires = [ "data.mount" ];
|
|
# security.acme.acceptTerms = true;
|
|
# security.acme.defaults.email = "root@thearcanebrony.net";
|
|
|
|
# environment.systemPackages = with pkgs; [
|
|
#gitfs
|
|
# ];
|
|
|
|
}
|