nix-conf/systems/hetzner/nginx.nix

116 lines
2.5 KiB
Nix
Raw Normal View History

2024-07-10 23:02:54 +02:00
{
config,
pkgs,
self,
...
}:
2024-05-01 19:33:12 +02:00
{
services.nginx = {
enable = true;
recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
virtualHosts = {
"missing.ninja" = {
2024-07-10 23:02:54 +02:00
serverAliases = [
"joens.zone"
"joens.website"
"joens.site"
"joens.online"
"joens.link"
"joens.international"
"joens.family"
"joens.digital"
"joens.blog"
"net0loggy.net"
"clan-war.net"
"net0loggy.de"
"dtg-c.de"
];
2024-05-01 19:33:12 +02:00
enableACME = true;
forceSSL = true;
};
"webmail.missing.ninja" = {
serverAliases = [ "joens.email" ];
};
"pad.missing.ninja" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:3333";
locations."/socket.io/" = {
proxyPass = "http://localhost:3333";
proxyWebsockets = true;
2024-07-10 23:02:54 +02:00
extraConfig = "proxy_ssl_server_name on;";
2024-05-01 19:33:12 +02:00
};
};
2024-05-05 10:00:13 +02:00
"test.missing.ninja" = {
forceSSL = true;
enableACME = true;
};
2024-07-16 20:53:45 +02:00
"search.missing.ninja" = {
forceSSL = true;
enableACME = true;
2024-07-16 21:34:23 +02:00
locations."/".proxyPass = "http://localhost:8080";
2024-07-16 20:53:45 +02:00
};
2024-05-01 19:33:12 +02:00
};
};
2024-05-01 19:34:08 +02:00
services.hedgedoc = {
2024-05-01 19:33:12 +02:00
enable = true;
settings = {
db = {
dialect = "sqlite";
torage = "/var/lib/hedgedoc/db.hedgedoc.sqlite";
};
domain = "pad.missing.ninja";
port = 3333;
useSSL = false;
protocolUseSSL = true;
};
};
2024-05-05 09:56:19 +02:00
services.wordpress.webserver = "nginx";
2024-05-05 10:39:36 +02:00
services.phpfpm.phpOptions = ''
post_max_size = "64M"
upload_max_filesize = "64M"
max_execution_time = 300
max_input_time = 300
'';
2024-05-05 09:56:19 +02:00
2024-07-16 20:53:45 +02:00
services.searx = {
enable = true;
2024-07-16 21:34:23 +02:00
runInUwsgi = false;
2024-07-16 21:33:09 +02:00
settings = {
server.secret_key = "NotASecret";
};
2024-07-16 20:53:45 +02:00
uwsgiConfig = {
socket = "/run/searx/searx.sock";
2024-07-16 21:03:22 +02:00
chmod-socket = "660";
2024-07-16 20:53:45 +02:00
};
};
2024-07-10 23:02:54 +02:00
services.wordpress.sites."test.missing.ninja" =
with self.packages.${config.nixpkgs.hostPlatform.system}; {
themes = [
madara
madara-child
pkgs.wordpressPackages.themes.twentytwentythree
];
plugins = [
madara-core
madara-shortcodes
option-tree
option-tree-lean
widget-logic
];
settings = {
FORCE_SSL_ADMIN = true;
};
extraConfig = ''
$_SERVER['HTTPS']='on';
'';
2024-05-05 09:56:19 +02:00
};
2024-05-01 19:33:12 +02:00
}