home: Add ankisyncd plugin
This commit is contained in:
parent
6557aeee25
commit
0dff0b89c8
|
@ -31,6 +31,7 @@ in
|
|||
home-manager.users.simon = { pkgs, ... }: {
|
||||
imports = [
|
||||
./modules/alacritty.nix
|
||||
./modules/ankisyncd.nix
|
||||
./modules/sway.nix
|
||||
./modules/zathura.nix
|
||||
];
|
||||
|
|
13
users/simon/files/ankisyncd/__init__.py
Normal file
13
users/simon/files/ankisyncd/__init__.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
import anki.sync
|
||||
import anki.hooks
|
||||
import aqt
|
||||
|
||||
anki.sync.SYNC_BASE = "https://anki.sbruder.de/%s"
|
||||
anki.sync.SYNC_MEDIA_BASE = "https://anki.sbruder.de/msync%s"
|
||||
|
||||
|
||||
def resetHostNum():
|
||||
aqt.mw.pm.profile["hostNum"] = None
|
||||
|
||||
|
||||
anki.hooks.addHook("profileLoaded", resetHostNum)
|
3
users/simon/modules/ankisyncd.nix
Normal file
3
users/simon/modules/ankisyncd.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
home.file.".local/share/Anki2/addons21/ankisyncd/__init__.py".source = ../files/ankisyncd/__init__.py;
|
||||
}
|
Loading…
Reference in a new issue