Merge branch 'main' of codeberg.org:muon/home

This commit is contained in:
muon 2026-01-17 11:01:59 +00:00
commit c960a79e21
7 changed files with 236 additions and 249 deletions

View file

@ -75,43 +75,40 @@ in {
forceSSL = true;
locations."/" = {proxyPass = "http://10.0.0.3:5001";};
};
"seedbox.muon.host" = {
"stream.muon.host" = {
forceSSL = true;
enableACME = true;
locations = {
"/" = {
proxyPass = "http://10.0.0.3:3013";
};
"/api" = {
"/api/" = {
proxyPass = "http://10.0.0.3:3014";
extraConfig =
#sh
''
limit_req zone=api burst=20 nodelay;
# CORS headers
add_header Access-Control-Allow-Origin "*" always;
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" always;
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;
add_header Access-Control-Expose-Headers "Content-Length,Content-Range" always;
# add_header Access-Control-Allow-Origin "*" always;
# add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" always;
# add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;
# add_header Access-Control-Expose-Headers "Content-Length,Content-Range" always;
# Handle preflight requests
if ($request_method = 'OPTIONS') {
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS";
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization";
add_header Content-Type text/plain;
add_header Content-Length 0;
return 204;
}
# if ($request_method = 'OPTIONS') {
# add_header Access-Control-Allow-Origin "*";
# add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS";
# add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization";
# add_header Content-Type text/plain;
# add_header Content-Length 0;
# return 204;
# }
'';
};
"/api/stream" = {
"/api/stream/" = {
proxyPass = "http://10.0.0.3:3014";
extraConfig =
#sh
''
limit_req zone=download burst=10 nodelay;
proxy_set_header Range $http_range;
# Streaming optimizations

View file

@ -21,6 +21,8 @@ in {
mods.terminal.tools.enable = true;
mods.desktop.development.enable = true;
mods.desktop.productivity.enable = false;
mods.zen.enable = true;
mods.obsidian.enable = true;
home.packages = with pkgs;
[