aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorKaran Jayachandra <mail@karanjayachandra.com>2026-07-31 21:27:22 +0200
committerKaran Jayachandra <mail@karanjayachandra.com>2026-07-31 21:27:22 +0200
commitb915129dcf6c0043df3c629fe938986da661340f (patch)
tree94478f46b4a37727a39c446e59d2fee245206ae3 /modules
parentfc48270b7e8de9be41060dbd95a35ee359664424 (diff)
Added a memos instance
Diffstat (limited to 'modules')
-rw-r--r--modules/caddy.nix7
-rw-r--r--modules/memos.nix24
2 files changed, 31 insertions, 0 deletions
diff --git a/modules/caddy.nix b/modules/caddy.nix
index f82c7f0..64418c3 100644
--- a/modules/caddy.nix
+++ b/modules/caddy.nix
@@ -37,6 +37,13 @@
'';
};
+ # Memos - note-taking app
+ "notes.karanj.com" = {
+ extraConfig = ''
+ reverse_proxy 127.0.0.1:5230
+ '';
+ };
+
# cgit - public read-only git viewer + smart HTTP for git clone/pull.
# Both cgit browsing and git-http-backend (clone/pull) are served by
# the same nginx vhost on 8086 - nginx itself routes between them by
diff --git a/modules/memos.nix b/modules/memos.nix
new file mode 100644
index 0000000..bc80e24
--- /dev/null
+++ b/modules/memos.nix
@@ -0,0 +1,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";
+ };
+ };
+}