aboutsummaryrefslogtreecommitdiff
path: root/modules/memos.nix
blob: bc80e24a336c288a8327584bf70d1241708092cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ config, ... }:

# Memos - lightweight, privacy-first note-taking app.
#
# Native NixOS module (services.memos, available since this flake's pinned
# nixpkgs release). Listens on 127.0.0.1:5230; Caddy handles public HTTPS
# termination. Uses the module's default sqlite driver - no separate
# database service needed, unlike Miniflux's Postgres.
#
# No secrets involved: the first account is created directly in the web UI
# on first visit to https://notes.karanj.com.
{
  services.memos = {
    enable = true;
    settings = {
      MEMOS_MODE = "prod";
      MEMOS_ADDR = "127.0.0.1";
      MEMOS_PORT = "5230";
      MEMOS_DRIVER = "sqlite";
      MEMOS_DATA = config.services.memos.dataDir;
      MEMOS_INSTANCE_URL = "https://notes.karanj.com";
    };
  };
}