nix-config/hosts/caveman/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
1.4 KiB
Nix
Raw Normal View History

2022-11-03 20:49:26 +01:00
{ config, ... }:
{
system.stateVersion = "22.05";
c3d2 = {
deployment.server = "server10";
hq.statistics.enable = true;
2022-11-03 20:49:26 +01:00
};
microvm = {
vcpu = 8;
mem = 16 * 1024;
2022-11-03 20:49:26 +01:00
};
2022-12-20 04:55:17 +01:00
networking = {
hostName = "caveman";
firewall.allowedTCPPorts = [ 23 ];
};
2022-11-03 20:49:26 +01:00
services.journald.extraConfig = ''
Storage=volatile
'';
2023-01-06 23:57:20 +01:00
services = {
caveman = {
# leave 4 GB for caveman services
redis.maxmemory = (config.microvm.mem - 4) * 1024 * 1024;
2022-11-03 20:49:26 +01:00
2023-01-06 23:57:20 +01:00
hunter = {
enable = true;
settings = {
max_workers = 384;
hosts = with builtins;
filter isString (
split "\n" (
readFile ./mastodon-instances.txt
)
);
};
2022-11-03 20:49:26 +01:00
};
2023-01-22 21:03:23 +01:00
butcher.enable = true;
2023-01-06 23:57:20 +01:00
gatherer.enable = true;
smokestack.enable = true;
2022-11-03 20:49:26 +01:00
};
2023-01-06 23:57:20 +01:00
nginx = {
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}/";
};
};
};
2022-11-03 20:49:26 +01:00
}