{ config, ... }: { system.stateVersion = "22.05"; c3d2.hq.statistics.enable = true; c3d2.deployment = { server = "server10"; mounts = [ "etc" "var"]; }; microvm = { vcpu = 8; mem = 16 * 1024; }; networking = { hostName = "caveman"; firewall.allowedTCPPorts = [ 23 80 443 ]; }; services.journald.extraConfig = '' Storage=volatile ''; services.caveman = { redis.maxmemory = config.microvm.mem * 1024 * 1024 / 2; hunter = { enable = true; settings = { max_workers = 128; hosts = with builtins; filter isString ( split "\n" ( readFile ./mastodon-instances.txt ) ); }; }; gatherer.enable = true; smokestack.enable = true; }; services = { nginx = rec { enable = true; virtualHosts."fedi.buzz" = { default = true; forceSSL = true; enableACME = true; serverAliases = [ "www.fedi.buzz" "caveman.flpk.zentralwerk.org" ]; locations."/".proxyPass = "http://127.0.0.1:${toString config.services.caveman.gatherer.settings.listen_port}/"; }; virtualHosts."relay.fedi.buzz" = { forceSSL = true; enableACME = true; locations."/".proxyPass = "http://127.0.0.1:${toString 3000}/"; }; }; }; }