2023-02-25 00:03:29 +01:00
{ config , pkgs , lib , mkDomain , . . . }:
{
# Nitter
# Alternative Twitter front-end
services . nitter = {
enable = true ;
package = pkgs . unstable . nitter ;
#openFirewall
#config.base64Media = false; # Use base64 encoding for proxied media URLs.
server . title = " P j i t t e r " ;
server . address = " 1 2 7 . 0 . 0 . 1 " ;
server . hostname = mkDomain " n i t t e r " ;
server . https = true ; # Secure cookies
server . port = 4965 ;
#preferences.autoplayGifs = ; # default is true
#preferences.bidiSupport = ; # Support bidirectional text (makes clicking on tweets harder). default is false
#preferences.hideBanner = ; # Hide profile banner. default is false
#preferences.hidePins = ; # Hide pinned tweets. default is false
#preferences.hideReplies = ; # Hide tweet replies. default is false
#preferences.hideTweetStats = ; # Hide tweet stats (replies, retweets, likes). default is false
preferences . hlsPlayback = true ; # Enable HLS video streaming (requires JavaScript). default is false
preferences . infiniteScroll = true ; # Infinite scrolling (requires JavaScript, experimental!). default is false
#preferences.mp4Playback = ; # Enable MP4 video playback. default is true
#preferences.muteVideos = ; # Mute videos by default. default is false
#preferences.proxyVideos = ; # Proxy video streaming through the server (might be slow). default is true
2023-06-11 11:14:01 +02:00
#preferences.replaceInstagram = "bibliogram.art"; # Replace Instagram links with links to this instance (blank to disable). default is ""
2023-02-25 00:03:29 +01:00
preferences . replaceTwitter = mkDomain " n i t t e r " ; # Replace Twitter links with links to this instance (blank to disable). default is ""
preferences . replaceYouTube = lib . mkIf config . services . invidious . enable ( mkDomain " i n v i d i o u s " ) ; # Replace YouTube links with links to this instance (blank to disable). default is ""
settings = lib . mkIf config . services . libreddit . enable {
2024-08-13 16:26:58 +02:00
Preferences . replaceReddit = mkDomain " l i b r e d d i t " ; # Replace Reddit links with links to this instance (blank to disable). default is ""
2023-02-25 00:03:29 +01:00
} ;
#preferences.stickyProfile = ; # Make profile sidebar stick to top. default is true
preferences . theme = " T w i t t e r D a r k " ; # Instance theme. default is "Nitter"
} ;
services . nginx . virtualHosts . ${ mkDomain " n i t t e r " } = lib . mkIf config . services . nitter . enable {
forceSSL = true ; # addSSL = true;
enableACME = true ; #useACMEHost = acmeDomain;
locations . " / " = {
proxyPass = " h t t p : / / 1 2 7 . 0 . 0 . 1 : ${ toString config . services . nitter . server . port } " ;
proxyWebsockets = true ;
} ;
} ;
}