Push to see what I still have to remove lol

This commit is contained in:
Jimbo 2025-02-28 14:12:07 -05:00
parent 8c30ba9fea
commit 8d1a992bb2
27 changed files with 25 additions and 337 deletions

View file

@ -1,9 +1,6 @@
{ config, lib, ... }:
{
imports = [
./rtmp
./virtualhosts
];
imports = [ ./virtualhosts ];
config = lib.mkIf config.system.server.enable {
services.nginx = {
@ -14,8 +11,6 @@
recommendedProxySettings = true;
};
environment.persistence."/persist".directories = [ "/var/www" ];
networking.firewall.allowedTCPPorts = [
80
443

View file

@ -1,32 +0,0 @@
{ config, lib, pkgs, ... }:
{
options.services.nginx.rtmp.enable = lib.mkEnableOption "Enable an RTMP server using Nginx";
config = lib.mkIf config.services.nginx.rtmp.enable {
services.nginx = {
package = (pkgs.nginx.override {
modules = with pkgs.nginxModules; [ rtmp ];
});
appendConfig = ''
rtmp {
server {
listen 1935;
chunk_size 4096;
allow publish all;
application stream {
record off;
live on;
allow play all;
hls on;
hls_path /var/www/landing-page/streams/hls/;
hls_fragment_naming system;
hls_fragment 3;
hls_playlist_length 40;
}
}
}
'';
};
systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www/landing-page/streams/hls/" ];
};
}

View file

@ -1,7 +1,6 @@
{ ... }:
{
imports = [
./nixfox
./jimbosfiles
./example
];
}

View file

@ -1,16 +1,16 @@
{ config, lib, ... }:
{
services.nginx.virtualHosts = lib.mkIf config.system.server.enable {
"www.nixfox.ca" = {
"www.example.com" = {
enableACME = true;
addSSL = true;
default = true;
root = "/var/www/landing-page";
};
"nixfox.ca" = {
"example.com" = {
enableACME = true;
addSSL = true;
globalRedirect = "www.nixfox.ca";
globalRedirect = "www.example.com";
};
};
}

View file

@ -1,27 +0,0 @@
{ config, lib, ... }:
{
services.nginx.virtualHosts."jimbosfiles.com" = lib.mkIf config.system.server.enable {
enableACME = true;
addSSL = true;
globalRedirect = "www.nixfox.ca";
locations = {
"/.well-known/matrix/client".extraConfig = ''
default_type application/json;
return 200 '
{
"m.homeserver": {
"base_url": "https://matrix.jimbosfiles.com"
},
"m.identity_server": {
"base_url": "https://matrix.org"
}
}
';
'';
"/.well-known/matrix/server".extraConfig = ''
default_type application/json;
return 200 '{ "m.server": "matrix.jimbosfiles.com:443" }';
'';
};
};
}