added ability to make temporary upload sites on cirrostratus.

This commit is contained in:
Gabe Venberg 2025-04-12 11:28:01 +02:00
parent 86f3b1177d
commit cf33c036dd
4 changed files with 26 additions and 4 deletions
configs/nixos
hosts/cirrostratus
roles/home-manager

View file

@ -18,6 +18,8 @@
EULA = "TRUE"; EULA = "TRUE";
TYPE = "FORGE"; TYPE = "FORGE";
VERSION = "1.20.1"; VERSION = "1.20.1";
# GENERIC_PACK="https://static.venberg.xyz/minecraft/create-post-production/modpack.zip";
# REMOVE_OLD_MODS="TRUE";
PACKWIZ_URL = "https://static.venberg.xyz/minecraft/less-than-compact-2/pack.toml"; PACKWIZ_URL = "https://static.venberg.xyz/minecraft/less-than-compact-2/pack.toml";
MEMORY = "16G"; MEMORY = "16G";
USE_AIKAR_FLAGS = "true"; USE_AIKAR_FLAGS = "true";
@ -29,9 +31,7 @@
# SETUP_ONLY = "true"; # SETUP_ONLY = "true";
MOTD = "Welcome!"; MOTD = "Welcome!";
DIFFICULTY = "normal"; DIFFICULTY = "normal";
OPS = '' OPS ="TheToric";
TheToric
'';
ENFORCE_WHITELIST = "true"; ENFORCE_WHITELIST = "true";
ENABLE_WHITELIST = "true"; ENABLE_WHITELIST = "true";
ANNOUNCE_PLAYER_ACHIEVEMENTS = "true"; ANNOUNCE_PLAYER_ACHIEVEMENTS = "true";

View file

@ -0,0 +1,22 @@
{
inputs,
config,
pkgs,
lib,
...
}: let
port = "5050";
in {
# this is so you can start miniserve in a directory to temporarily allow people to upload:
# miniserve --port=5050 --no-symlinks --upload-files --mkdir --show-wget-footer --auth user:pass ./
environment.systemPackages = with pkgs; [
miniserve
];
services.nginx.virtualHosts."upload.venberg.xyz" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${port}";
};
};
}

View file

@ -25,6 +25,7 @@ inputs.nixpkgs.lib.nixosSystem {
../../configs/nixos/factorio-docker.nix ../../configs/nixos/factorio-docker.nix
../../configs/nixos/cyberchef.nix ../../configs/nixos/cyberchef.nix
../../configs/nixos/miniserve-directory.nix ../../configs/nixos/miniserve-directory.nix
../../configs/nixos/miniserve-tmp-upload.nix
../../configs/nixos/minecraft-docker.nix ../../configs/nixos/minecraft-docker.nix
../../configs/nixos/nginx-static.nix ../../configs/nixos/nginx-static.nix
({ ({

View file

@ -24,7 +24,6 @@
hyperfine hyperfine
fclones fclones
libqalculate libqalculate
miniserve
]; ];
programs = { programs = {