Commit e885a9bf authored by Jörg Thalheim's avatar Jörg Thalheim
Browse files

nixos/freshrss: add api.enable option

Add a new `services.freshrss.api.enable` option to enable API access
for mobile apps and third-party clients.

When enabled, this passes `--api-enabled` to the FreshRSS reconfigure
script, allowing access to the Google Reader API and Fever API endpoints.

Users must still set individual API passwords in their profile settings.
parent d7c3dfa5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -193,6 +193,8 @@ in
      default = "form";
      description = "Authentication type for FreshRSS.";
    };

    api.enable = mkEnableOption "API access for mobile apps and third-party clients (Google Reader API and Fever API). Users must set individual API passwords in their profile settings";
  };

  config =
@@ -325,6 +327,7 @@ in
              "--base-url" = ''"${cfg.baseUrl}"'';
              "--language" = ''"${cfg.language}"'';
              "--db-type" = ''"${cfg.database.type}"'';
              ${if cfg.api.enable then "--api-enabled" else null} = "";
              # The following attributes are optional depending on the type of
              # database.  Those that evaluate to null on the left hand side
              # will be omitted.