Change a lot, mostly adding 3 Minecraft servers and Velocity
This commit is contained in:
parent
1d3c95e680
commit
c6accc294d
37 changed files with 1732 additions and 200 deletions
|
@ -1,7 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
services.nginx = let
|
||||
secrets = import ../modules/secrets.nix;
|
||||
in {
|
||||
{pkgs, outputs, ...}: {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
package = (pkgs.nginx.override {
|
||||
modules = with pkgs.nginxModules; [ rtmp ];
|
||||
|
@ -12,10 +10,10 @@
|
|||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
# Landing page
|
||||
"${secrets.jimDomain}" = {
|
||||
"${outputs.secrets.jimDomain}" = {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
root = "/etc/nixos/nixos/server/webpages/Jimbo-Landing-Page";
|
||||
root = "/var/www/Jimbo-Landing-Page";
|
||||
locations = {
|
||||
"/.well-known/matrix/client" = {
|
||||
extraConfig = ''
|
||||
|
@ -23,13 +21,13 @@
|
|||
return 200 '
|
||||
{
|
||||
"m.homeserver": {
|
||||
"base_url": "https://matrix.${secrets.jimDomain}"
|
||||
"base_url": "https://matrix.${outputs.secrets.jimDomain}"
|
||||
},
|
||||
"m.identity_server": {
|
||||
"base_url": "https://matrix.org"
|
||||
},
|
||||
"org.matrix.msc3575.proxy": {
|
||||
"url": "https://matrix.${secrets.jimDomain}"
|
||||
"url": "https://matrix.${outputs.secrets.jimDomain}"
|
||||
}
|
||||
}';
|
||||
'';
|
||||
|
@ -37,14 +35,14 @@
|
|||
"/.well-known/matrix/server" = {
|
||||
extraConfig = ''
|
||||
default_type application/json;
|
||||
return 200 '{"m.server": "matrix.${secrets.jimDomain}:443"}';
|
||||
return 200 '{"m.server": "matrix.${outputs.secrets.jimDomain}:443"}';
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Bluemap Proxy, TODO, move this into the nix-minecraft flake configs
|
||||
"bluemap.${secrets.jimDomain}" = {
|
||||
"john.${outputs.secrets.jimDomain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
|
@ -62,11 +60,11 @@
|
|||
application stream {
|
||||
record off;
|
||||
live on;
|
||||
allow play all;
|
||||
allow play all;
|
||||
hls on;
|
||||
hls_path /var/www/jimweb/streams/hls;
|
||||
hls_fragment_naming system;
|
||||
hls_fragment 3;
|
||||
hls_path /var/www/Jimbo-Landing-Page/streams/hls/;
|
||||
hls_fragment_naming system;
|
||||
hls_fragment 3;
|
||||
hls_playlist_length 40;
|
||||
}
|
||||
}
|
||||
|
@ -76,6 +74,6 @@
|
|||
|
||||
# Allow Nginx to read and write to paths
|
||||
systemd.services.nginx.serviceConfig = {
|
||||
ReadWritePaths = [ "/etc/nixos/nixos/server/webpages/Jimbo-Landing-Page" ];
|
||||
ReadWritePaths = [ "/var/www/Jimbo-Landing-Page/streams/hls/" ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue