aboutsummaryrefslogtreecommitdiff
path: root/kobo/clara/default.nix
blob: 0bb35d41b5bc9174931e9caf9efa5b398bc1237b (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{ config, pkgs, lib, ... }:
with builtins // lib;
{
  device = {
    name = "Kobo Clara HD";
    serialNumber = "N249191243488";
    affiliate = "kobo";
    forceAffiliate = true;
  };

  firmware = {
    version = "4.38.23038";
    date = "Jun2024";
    hash = "sha256-ma9Hf0Hc4hDqf1KQwM6TdX3lZo9HPWMrQqU45eFBScs=";
  };

  kobo = {
    enable = true;
    file = {
      "screensaver/main.png".source = ./screensaver.png;
    };
  };

  plato = {
    enable = true;
    fonts = with pkgs; [
      fira-math
    ];
    dictionaries = with pkgs.dictdDBs; [
      wordnet
      wiktionary
    ];

    settings = {
      keyobard-layout = "English";
      frontlight = true;
      sleep-cover = true;
      auto-suspend = 15.0;
      auto-power-off = 4.0;
      wifi = false;
      auto-share = false;
      time-format = "%I:%M%P";
      reader = {
        font-size = 10.0;
        font-family = "Fira Math";
        font-path = "fonts";
      };
      dictionary = {
        font-size = 10.0;
      };
      intermissions = rec {
        suspend = "cover:";
        power-off = "${config.kobo.devicePath}/screensaver/main.png";
        share = power-off;
      };
      libraries = [
        {
          name = "On Board";
          path = "/mnt/onboard";
          mode = "database";
          sort-method = "progress";
          first-column = "title-and-author";
          second-column = "progress";
          thumbnail-previews = true;
        }
      ];
    };
  };

  nickel = {
    enable = true;

    menu.item = {
      settings = [
        {
          location = "main";
          label = "IP Address";
          action = "cmd_output";
          arg = [
            "500"
            "/sbin/ifconfig | /usr/bin/awk '/inet addr/{print substr($2,6)}'"
          ];
        }
      ];
    };
  };
}