Tt-rss

From NixOS Wiki
Revision as of 10:24, 23 June 2024 by Mic92 (talk | contribs) (imported from old wiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Install

services.tt-rss = {
  enable = true;
  # to configure a nginx virtual host directly:
  virtualHost = "tt-rss.example.com";
  selfUrlPath = "https://tt-rss.example.com";
  # or for hosting on sub-path:
  selfUrlPath = "https://example.com/tt-rss";
};

Configuration

By default tt-rss creates an admin user with password password. After logging in for the first time, do not forget to change it!

Disabling the admin user completely

After installing and creating a new user, you can disable the admin by setting its access level to -2 [1].

Either manually by running:

sudo -u tt_rss nix-shell -p php \
  --run 'php /var/lib/tt-rss/www/update.php --user-set-access-level "admin:-2"'

You can even automate this to ensure it is always set to -2 by e.g. utilising a PreStart snippet:

systemd.services.tt-rss.preStart = lib.mkAfter ''
  ${pkgs.php}/bin/php ${config.services.tt-rss.root}/www/update.php \
    --user-set-access-level "admin:-2"
'';

Enabling TLS for nginx virtual host

Assuming you have ACME set-up for example.com:

services.nginx.virtualHosts."${config.services.tt-rss.virtualHost}" = {
  forceSSL = true;
  useACMEHost = "example.com"
};