diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/caddy.nix | 7 | ||||
| -rw-r--r-- | modules/memos.nix | 24 |
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"; + }; + }; +} |
