about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2023-10-07 21:23:59 +0900
committersefidel <contact@sefidel.net>2023-10-07 21:39:50 +0900
commite46b61c74507b7c117582c38fe33c87a650fb6fe (patch)
tree1dac7d05e6b0c9f59b9fcdf2eb8dea3f11ee8d72 /modules
parent6598dda5639863b38ba9719486bfe37dba688e95 (diff)
downloadinfra-e46b61c74507b7c117582c38fe33c87a650fb6fe.tar.gz
infra-e46b61c74507b7c117582c38fe33c87a650fb6fe.zip
feat(modules/tt-rss): init
Diffstat (limited to 'modules')
-rw-r--r--modules/services/tt-rss.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/modules/services/tt-rss.nix b/modules/services/tt-rss.nix
new file mode 100644
index 0000000..4351065
--- /dev/null
+++ b/modules/services/tt-rss.nix
@@ -0,0 +1,42 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+  cfg = config.modules.services.tt-rss;
+in
+{
+  options.modules.services.tt-rss = {
+    enable = mkEnableOption "Tiny Tiny RSS Client";
+    domain = mkOption { type = types.str; };
+    realHost = mkOption { type = types.str; default = "rss.${cfg.domain}"; };
+  };
+
+  config = mkIf cfg.enable {
+    services.tt-rss = {
+      enable = true;
+      virtualHost = cfg.realHost;
+      selfUrlPath = "https://${cfg.realHost}";
+
+      themePackages = [
+        pkgs.tt-rss-theme-feedly
+      ];
+
+      plugins = [
+        "auth_internal"
+        "note"
+      ];
+
+      database = {
+        type = "pgsql";
+        password = null;
+        host = "/run/postgresql";
+      };
+
+    };
+
+    services.nginx.virtualHosts.${cfg.realHost} = {
+      forceSSL = true;
+      useACMEHost = cfg.domain;
+    };
+  };
+}