nixos-config/modules/nitter.nix
2022-09-25 01:48:32 +02:00

41 lines
775 B
Nix

{ lib, ... }:
let
domain = "t.mc-fucker.cool";
nitter_port = "23145";
redis_port = 56379;
in
{
services.nitter = {
enable = true;
openFirewall = true;
redisCreateLocally = false;
cache = {
listMinutes = 480;
#redisPort = redis_port;
};
server = {
hostname = domain;
https = true;
port = (lib.strings.toInt nitter_port);
};
preferences = {
hlsPlayback = true;
infiniteScroll = true;
replaceTwitter = domain;
replaceYouTube = "y${domain}";
};
};
services.nginx.virtualHosts."${domain}" = {
forceSSL = true;
enableACME = true;
locations = {
"/" = {
proxyPass = "http://127.0.0.1:${nitter_port}";
};
};
};
}
# vim: set et ts=2 sw=2 ai: