nixos-config/modules/nitter.nix
2022-11-24 18:22:26 +01:00

45 lines
913 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}";
};
};
extraConfig = ''
access_log /var/log/nginx/${domain}_access.log;
error_log /var/log/nginx/${domain}_error.log;
'';
};
}
# vim: set et ts=2 sw=2 ai: