{ pkgs, config, ... }: { # todo redlib instead of libreddit services.libreddit = { enable = true; address = "127.0.0.1"; port = 3672; package = pkgs.redlib; }; services.nginx = { virtualHosts = { "libreddit.${config.networking.domain}" = { forceSSL = true; enableACME = true; locations."/" = { proxyPass = " http://127.0.0.1:3672"; extraConfig = '' access_log /var/log/nginx/$server_name-access.log json_analytics; ''; }; }; }; }; }