anki: Use anki-bin

This also removes ankisyncd, which in its current version in nixpkgs
does not support the latest anki version.
This commit is contained in:
Simon Bruder 2022-07-13 20:47:15 +02:00
parent a88c85993e
commit e67d68a05d
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
4 changed files with 4 additions and 33 deletions

View file

@ -5,7 +5,6 @@
./hardware-configuration.nix ./hardware-configuration.nix
../../modules ../../modules
./services/ankisyncd.nix
./services/bang-evaluator.nix ./services/bang-evaluator.nix
./services/buchborgen.nix ./services/buchborgen.nix
./services/coturn.nix ./services/coturn.nix

View file

@ -1,17 +0,0 @@
{ config, ... }:
let
cfg = config.services.ankisyncd;
in
{
services.ankisyncd = {
enable = true;
host = "127.0.0.1";
};
services.nginx.virtualHosts."anki.sbruder.de" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://${cfg.host}:${toString cfg.port}";
};
}

View file

@ -1,13 +0,0 @@
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)

View file

@ -2,8 +2,10 @@
lib.mkIf nixosConfig.sbruder.gui.enable { lib.mkIf nixosConfig.sbruder.gui.enable {
home.packages = [ home.packages = [
pkgs.anki pkgs.anki-bin
]; ];
home.file.".local/share/Anki2/addons21/ankisyncd/__init__.py".source = ./ankisyncd-plugin.py; home.sessionVariables = {
ANKI_WAYLAND = 1;
};
} }