Tt-rss: Difference between revisions

Klinger (talk | contribs)
description and link
Ntninja (talk | contribs)
Added Caddy web server configuration (hopefully I’ll be able to upstream this at some point)
 
Line 14: Line 14:
   selfUrlPath = "https://example.com/tt-rss";
   selfUrlPath = "https://example.com/tt-rss";
};
};
</syntaxhighlight>
=== Using Caddy as web server instead of nginx ===
As of NixOS 24.11 the following configuration works, future versions of NixOS may expose this as native Caddy support for Tiny Tiny RSS instead:<syntaxhighlight lang="nix">
{ config, pkgs, lib, ... }:
let
hostNames = [
"tt-rss.example.com"
];
in {
services.tt-rss = {
enable = true;
# Address at which Tiny Tiny RSS is publically exposed
selfUrlPath = "https://${lib.lists.head hostNames}/";
# Disable nginx integration as it will conflict with Caddy
virtualHost = null;
};
# Caddy reverse proxy configuration
services.caddy.virtualHosts.tt-rss = {
hostName = lib.lists.head hostNames;
serverAliases = lib.lists.tail hostNames;
extraConfig = ''
root * ${config.services.tt-rss.root}/www
php_fastcgi * unix/${config.services.phpfpm.pools.${config.services.tt-rss.pool}.socket} {
capture_stderr
}
file_server {
browse
}
'';
};
# Workaround: Create PHP-FPM socket with Caddy user instead of non-existing nginx
services.phpfpm.pools."${config.services.tt-rss.pool}".settings = {
"listen.owner" = config.services.caddy.user;
"listen.group" = config.services.caddy.group;
};
}
</syntaxhighlight>
</syntaxhighlight>