about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2023-02-07 02:22:49 +0900
committersefidel <contact@sefidel.net>2023-02-07 02:22:49 +0900
commit0350284e93152b7938287ea52b0aab1bc8f89b9e (patch)
tree01725fbe03da4274772793419118bb3a0244ce51 /nixos
parent20db890c482c138d61f29631980e83f25190a45d (diff)
downloadnixrc-0350284e93152b7938287ea52b0aab1bc8f89b9e.tar.gz
nixrc-0350284e93152b7938287ea52b0aab1bc8f89b9e.zip
feat(nixos/cobalt): akkoma: use pleroma icon
Diffstat (limited to 'nixos')
-rw-r--r--nixos/cobalt/services/akkoma-assets/logo.pngbin0 -> 1304 bytes
-rw-r--r--nixos/cobalt/services/akkoma.nix17
2 files changed, 14 insertions, 3 deletions
diff --git a/nixos/cobalt/services/akkoma-assets/logo.png b/nixos/cobalt/services/akkoma-assets/logo.png
new file mode 100644
index 0000000..7744b1a
--- /dev/null
+++ b/nixos/cobalt/services/akkoma-assets/logo.png
Binary files differdiff --git a/nixos/cobalt/services/akkoma.nix b/nixos/cobalt/services/akkoma.nix
index 7164b3f..c01689a 100644
--- a/nixos/cobalt/services/akkoma.nix
+++ b/nixos/cobalt/services/akkoma.nix
@@ -3,15 +3,21 @@
 let
   poorObfuscation = y: x: "${x}@${y}";
   federation-blocklist = lib.importTOML ./akkoma-assets/blocklist.toml;
+
+  # ifd3f/infra
+  wrapFile = name: path:
+    (pkgs.runCommand name { inherit path; } ''
+      cp -r "$path" "$out"
+    '');
 in
 {
   services.akkoma = {
     enable = true;
     initDb.enable = true;
 
-    # extraStatic = {
-    #   "favicon.png" =
-    # };
+    extraStatic = {
+      "static/logo.png" = wrapFile "logo.png" ./akkoma-assets/logo.png;
+    };
     config = let inherit ((pkgs.formats.elixirConf { }).lib) mkRaw mkMap;
     in {
       ":pleroma"."Pleroma.Web.Endpoint".url.host = "social.sefidel.com";
@@ -27,6 +33,11 @@ in
 
         limit = 5000;
       };
+      ":pleroma".":frontend_configurations" = {
+        pleroma_fe = mkMap {
+          logo = "/static/logo.png";
+        };
+      };
       ":pleroma".":mrf" = {
         policies = map mkRaw [ "Pleroma.Web.ActivityPub.MRF.SimplePolicy" ];
       };