about summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index d074ab1..ada99e8 100644
--- a/flake.nix
+++ b/flake.nix
@@ -78,6 +78,32 @@
             example = "https://indieauth.com/auth";
             description = "Authorization endpoint to use to authenticate the user. You can use the default if you are unsure.";
           };
+          mediaEndpoint = mkOption {
+            type = types.nullOr types.str;
+            description = "The URL of a media endpoint to announce when asked by a Micropub client. Strongly recommended if you plan to upload images.";
+          };
+          microsubServer = mkOption {
+            type = types.nullOr types.str;
+            example = "https://aperture.p3k.io/microsub/69420";
+            description = ''
+              The URL of your Microsub server, which saves feeds for you
+              and allows you to browse Web content from one place. Try
+              https://aperture.p3k.io/ if you don't have one yet!
+            '';
+          };
+          webmentionEndpoint = mkOption {
+            type = types.nullOr types.str;
+            example = "https://webmention.io/example.com/webmention";
+            description = ''
+              The URL of your webmention endpoint, which allows you to
+              receive notifications about your site's content being featured
+              or interacted with elsewhere on the IndieWeb.
+
+              By default Kittybox expects the Webmention endpoint to post
+              updates using an internal token. kittybox-webmention is an
+              endpoint capable of that.
+            '';
+          };
           internalTokenFile = mkOption {
             type = types.nullOr types.str;
             example = "/run/secrets/kittybox-shared-secret";
@@ -96,6 +122,7 @@
             cfg.package
             cfg.redisUri cfg.tokenEndpoint
             cfg.authorizationEndpoint
+            cfg.internalTokenFile
             cfg.bind cfg.port
           ];
 
@@ -103,6 +130,9 @@
             SERVE_AT = "${cfg.bind}:${builtins.toString cfg.port}";
             AUTHORIZATION_ENDPOINT = cfg.authorizationEndpoint;
             TOKEN_ENDPOINT = cfg.tokenEndpoint;
+            MEDIA_ENDPOINT = cfg.mediaEndpoint;
+            MICROSUB_ENDPOINT = cfg.microsubServer;
+            WEBMENTION_ENDPOINT = cfg.webmentionEndpoint;
             REDIS_URI = if (cfg.redisUri == null) then "redis://127.0.0.1:6379/" else cfg.redisUri;
           };
 
@@ -221,6 +251,7 @@
         pkg-config lld
         rust-bin.default
         rust-bin.rls
+        rust-bin.rust-src
         redis
       ];
     };