summaryrefslogtreecommitdiff
path: root/instances/pocketbook.nix
blob: 9d4af8636e2778ec18e4ba4a93863f0f6b047bd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
  config,
  pkgs,
  lib,
  ...
}:
with builtins // lib;
let
  pocketbooksync = pkgs.fetchzip {
    url = "https://github.com/ckilb/pocketbooksync.koplugin/releases/download/v1.0.2/pocketbooksync.koplugin-v1.0.2.zip";
  };
  wifi = pkgs.fetchFromGitHub {
    owner = "Lomig";
    repo = "koreader-pocketbook-wifi";
    rev = "1278fe9";
  };

in
{
  koreader.flavor = "pocketbook";

  plugins = {
    pocketbooksync = "${pocketbooksync}/pocketbooksync.koplugin";
  };

  # patches = {
  #   "2-bookorbit-wifi-cycle.lua" = "${wifi}/patches/2-bookorbit-wifi-cycle.lua";
  #   "2-menu-footer-wifi-icon.lua" = "${wifi}/patches/2-menu-footer-wifi-icon.lua";
  #   "2-pocketbook-net-diag.lua" = "${wifi}/patches/2-pocketbook-net-diag.lua";
  #   "2-pocketbook-wifi-off.lua" = "${wifi}/pathces/2-pocketbook-wifi-off.lua";
  #   "2-pocketbook-wifi-silent-connect.lua" = "${wifi}/patches/2-pocketbook-wifi-silent-connect.lua";
  # };
  patchDirectories = [
    "${wifi}/patches"
  ];

  dictionaries = {
    Wiktionary = pkgs.fetchtar {
      url = "https://github.com/xxyzz/wiktionary_stardict/releases/download/20261020/en-en.tar.zst";
    };
    GNU = pkgs.fetchzip {
      url = "http://tovotu.de/data/stardict/gcide.zip";
    };
  };

  fonts = {
    Alegreya = "${pkgs.alegreya}/share/fonts/truetype";
    ComputerModern = "${pkgs.cm_unicode}/share/fonts/opentype";
  };
}