How can I add extensions to Freshrss on NixOS?

I have a simple freshrss config:

     services.freshrss = {
        enable = true;
        baseUrl = "http://freshrss";
        defaultUser = "Lxx";
        passwordFile = "/run/secrets/freshrss";

This works as expected but I’d like to add extensions to Freshrss and as I couldn’t find a Nix option for this I tried the manual method of creating /var/lib/freshrss/extensions and placing them there. However this does not seem to have an effect.

Does anyone else here use Freshrss with extensions? How do I make them work?

1 Like

This worked for me:

    services.freshrss = {
      enable = true;
      package = pkgs.freshrss.overrideAttrs (old: {
          overrideConfig = pkgs.writeText "constants.local.php" ''
              define('DATA_PATH', getenv('FRESHRSS_DATA_PATH'));
              define('THIRDPARTY_EXTENSIONS_PATH', getenv('FRESHRSS_DATA_PATH') . '/extensions');
              define('EXTENSIONS_PATH', getenv('FRESHRSS_DATA_PATH') . '/extensions');

I think it was originally looking for the extensions folder inside the original derivation.
This makes it look in the data directory instead.

(I took some hints from the package derivation: