about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2023-12-06 23:10:39 +0900
committersefidel <contact@sefidel.net>2023-12-06 23:38:52 +0900
commit6bb26431d3fd7696c85b73b3831abf8a89c9be90 (patch)
tree09201392f3a9d16603e465bb9625660d5c5990df /modules
parentac4871ea5201703018c08f1e68f4b02f08ba39df (diff)
downloadinfra-6bb26431d3fd7696c85b73b3831abf8a89c9be90.tar.gz
infra-6bb26431d3fd7696c85b73b3831abf8a89c9be90.zip
feat(modules/{tt-rss -> rss}): change tt-rss to freshrss
Diffstat (limited to 'modules')
-rw-r--r--modules/services/rss.nix (renamed from modules/services/tt-rss.nix)27
1 files changed, 12 insertions, 15 deletions
diff --git a/modules/services/tt-rss.nix b/modules/services/rss.nix
index 4351065..7c44580 100644
--- a/modules/services/tt-rss.nix
+++ b/modules/services/rss.nix
@@ -2,38 +2,35 @@
 
 with lib;
 let
-  cfg = config.modules.services.tt-rss;
+  cfg = config.modules.services.rss;
 in
 {
-  options.modules.services.tt-rss = {
-    enable = mkEnableOption "Tiny Tiny RSS Client";
+  options.modules.services.rss = {
+    enable = mkEnableOption "RSS Aggregator";
     domain = mkOption { type = types.str; };
     realHost = mkOption { type = types.str; default = "rss.${cfg.domain}"; };
+    secrets.admin-password = mkOption { type = types.str; description = "path to file containing admin password"; };
   };
 
   config = mkIf cfg.enable {
-    services.tt-rss = {
+    services.freshrss = {
       enable = true;
       virtualHost = cfg.realHost;
-      selfUrlPath = "https://${cfg.realHost}";
+      baseUrl = "https://${cfg.realHost}";
 
-      themePackages = [
-        pkgs.tt-rss-theme-feedly
-      ];
-
-      plugins = [
-        "auth_internal"
-        "note"
-      ];
+      defaultUser = "admin";
+      passwordFile = cfg.secrets.admin-password;
 
       database = {
         type = "pgsql";
-        password = null;
         host = "/run/postgresql";
       };
-
     };
 
+    environment.persistence."/persist".directories = [
+      "/var/lib/freshrss"
+    ];
+
     services.nginx.virtualHosts.${cfg.realHost} = {
       forceSSL = true;
       useACMEHost = cfg.domain;