Have anki-connect allow obsidian app.

main
Joshua Potter 2024-01-30 14:32:22 -07:00
parent 8e6f5c21f8
commit 14433dc50d
1 changed files with 28 additions and 7 deletions

View File

@ -10,7 +10,9 @@ let
fetchSubmodules = true;
};
anki-connect = pkgs.fetchFromGitea {
anki-connect = pkgs.stdenv.mkDerivation {
name = "anki-connect";
src = pkgs.fetchFromGitea {
domain = "git.foosoft.net";
owner = "alex";
repo = "anki-connect";
@ -18,6 +20,25 @@ let
hash = "sha256-5kwOZ6BLZqslBeOcX96GwLv3ME2J3czfw8oHG+ZgIQI=";
};
installPhase = ''
mkdir -p $out
cp -r ./plugin/* $out
cat <<EOF > $out/config.json
{
"apiKey": null,
"apiLogPath": null,
"webBindAddress": "127.0.0.1",
"webBindPort": 8765,
"webCorsOrigin": "http://localhost",
"webCorsOriginList": [
"http://localhost",
"app://obsidian.md"
]
}
EOF
'';
};
image-occlusion-enhanced = pkgs.fetchFromGitHub {
owner = "glutanimate";
repo = "image-occlusion-enhanced";
@ -54,7 +75,7 @@ in
};
"${addons 2055492159}".source =
"${anki-connect}/plugin";
anki-connect;
"${addons 1374772155}".source =
"${image-occlusion-enhanced}/src/image_occlusion_enhanced";