aboutsummaryrefslogtreecommitdiff
path: root/modules/services/nitter.nix
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2024-03-10 19:44:13 +0900
committersefidel <contact@sefidel.net>2024-03-10 19:44:13 +0900
commit4ec26fd36c7541874405afa534bc163ca42570c6 (patch)
treeff8d0a2a350142bad04d103d90ed3d878349797b /modules/services/nitter.nix
parent7a6ad3e6668989db5ceba31f08528dfce821cca6 (diff)
downloadnixrc-4ec26fd36c7541874405afa534bc163ca42570c6.zip
chore(modules/nitter): remove patch
Patch is now available upstream on c6edec04901d0a37799499ed4c6921db640fb5a4
Diffstat (limited to 'modules/services/nitter.nix')
-rw-r--r--modules/services/nitter.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/modules/services/nitter.nix b/modules/services/nitter.nix
new file mode 100644
index 0000000..81fcd3e
--- /dev/null
+++ b/modules/services/nitter.nix
@@ -0,0 +1,33 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+ cfg = config.modules.services.nitter;
+in
+{
+ options.modules.services.nitter = {
+ enable = mkEnableOption "nitter instance";
+
+ title = mkOption { type = types.str; default = "Nitter"; description = "Title of the nitter instance"; };
+
+ domain = mkOption { type = types.str; };
+ realHost = mkOption { type = types.str; default = "nitter.${cfg.domain}"; };
+ secrets = {
+ nitter-guest-accounts = mkOption { type = types.path; description = "path to the JSONL file containing guest accounts"; };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ services.nitter = {
+ enable = true;
+
+ server = {
+ title = cfg.title;
+ address = "127.0.0.1";
+ port = 4002;
+ hostname = cfg.realHost;
+ };
+ guestAccounts = cfg.secrets.nitter-guest-accounts;
+ };
+ };
+}