My nix-darwin and NixOS config
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

sharkey: enable Meilisearch for full-text search

+24 -14
+24 -14
modules/server/sharkey.nix
··· 12 12 # WebFinger redirect at ewancroft.uk (Vercel) still points to 13 13 # ap.ewancroft.uk, so handles resolve as @ewan@ewancroft.uk unchanged. 14 14 # 15 - # PostgreSQL + Redis: 16 - # services.sharkey.setupPostgresql and setupRedis both default to true in 17 - # nixpkgs, so local instances are provisioned and wired automatically. 15 + # PostgreSQL + Redis + Meilisearch: 16 + # services.sharkey.setupPostgresql, setupRedis, and setupMeilisearch are all 17 + # enabled. setupMeilisearch starts a local Meilisearch instance on port 7700 18 + # and wires it into Sharkey's config automatically via the NixOS module. 18 19 # 19 20 # Secrets (secrets/sharkey.env — sops dotenv): 20 21 # MK_CONFIG_DB_PASS=... PostgreSQL password for the sharkey user 21 - # MK_CONFIG_SMTP_PASS=... Resend API key 22 + # 23 + # SMTP is configured via Admin → Settings → Email in the Sharkey web UI, 24 + # NOT via the YAML config. There is no smtp key in the config schema. 22 25 # 23 26 # First-run: 24 27 # Open https://ap.ewancroft.uk — Sharkey prompts for initial setup. ··· 59 62 environmentFiles = [ config.sops.secrets."sharkey.env".path ]; 60 63 61 64 # Automatically provision a local PostgreSQL database and Redis instance. 62 - # Both default to true in nixpkgs — kept explicit here for clarity. 63 65 setupPostgresql = true; 64 66 setupRedis = true; 67 + 68 + # Meilisearch full-text search — local instance managed by the NixOS module. 69 + # Starts services.meilisearch on localhost:7700 and wires the API key automatically. 70 + setupMeilisearch = true; 71 + 65 72 openFirewall = false; 66 73 67 74 settings = { ··· 71 78 port = sk.port; 72 79 address = "127.0.0.1"; 73 80 81 + # ID generation algorithm — do NOT change after initial setup. 82 + # Changing this after data exists will corrupt existing record IDs. 83 + id = "aidx"; 84 + 85 + # Full-text search via Meilisearch — local instance on localhost:7700. 86 + # setupMeilisearch = true above provisions the service and API key automatically. 87 + fulltextSearch.provider = "meilisearch"; 88 + 74 89 # Media storage on /srv — survives rebuilds, same disk as other services. 75 90 mediaDirectory = sk.mediaDir; 76 91 77 - # SMTP via Resend — for password resets / notifications. 78 - # Password injected via MK_CONFIG_SMTP_PASS in the env file. 79 - smtp = { 80 - host = "smtp.resend.com"; 81 - port = 587; 82 - secure = false; # STARTTLS 83 - user = "resend"; 84 - from = "sharkey@server.ewancroft.uk"; 85 - }; 92 + # NOTE: SMTP / email is NOT configured here. 93 + # Sharkey stores email server settings in the database, configured via 94 + # Admin → Settings → Email in the web UI. There is no smtp key in the 95 + # Sharkey YAML config schema. 86 96 }; 87 97 }; 88 98