aboutsummaryrefslogtreecommitdiff
path: root/modules/koreader.nix
diff options
context:
space:
mode:
authorChris Wells <chris@mathematicaster.org>2024-02-14 15:13:20 -0600
committerChris Wells <chris@mathematicaster.org>2024-02-14 15:13:20 -0600
commitcbde891d1ced129f6284cbadade652182aa5d2fb (patch)
tree8c09770b3e4082dd3d205695e3d1827daba14ffc /modules/koreader.nix
parent51ae706e6c007cdda2ebb8317c1d438dff9ed570 (diff)
downloadkobo-manager-cbde891d1ced129f6284cbadade652182aa5d2fb.tar
kobo-manager-cbde891d1ced129f6284cbadade652182aa5d2fb.tar.gz
kobo-manager-cbde891d1ced129f6284cbadade652182aa5d2fb.tar.bz2
kobo-manager-cbde891d1ced129f6284cbadade652182aa5d2fb.tar.lz
kobo-manager-cbde891d1ced129f6284cbadade652182aa5d2fb.tar.xz
kobo-manager-cbde891d1ced129f6284cbadade652182aa5d2fb.tar.zst
kobo-manager-cbde891d1ced129f6284cbadade652182aa5d2fb.zip
Fixing my earlier mistakes
Diffstat (limited to 'modules/koreader.nix')
-rw-r--r--modules/koreader.nix28
1 files changed, 16 insertions, 12 deletions
diff --git a/modules/koreader.nix b/modules/koreader.nix
index 0a7300a..aec90fe 100644
--- a/modules/koreader.nix
+++ b/modules/koreader.nix
@@ -2,6 +2,7 @@
with builtins // lib;
let
cfg = config.koreader;
+ importOption = p: (import p { inherit pkgs lib; } cfg.path).option;
in {
options.koreader = {
enable = mkEnableOption "KOReader";
@@ -14,22 +15,25 @@ in {
nickelEntry = mkEnableOption "Launch KOReader directly via nickelMenu";
- file = mkOption {
- type = options.file.type;
- default = {};
- description = "Files relative to ${cfg.path}";
- };
+ file = importOption ./lib/file.nix;
+ manifest = importOption ./lib/manifest.nix;
+
+ # file = mkOption {
+ # type = options.file.type;
+ # default = {};
+ # description = "Files relative to ${cfg.path}";
+ # };
};
config = mkIf cfg.enable {
- file = mapAttrs' (n: v: {
- name = "koreader-${n}";
- value = v // {
- target = "${cfg.path}/${v.target}";
- };
- }) cfg.file
+ # file = mapAttrs' (n: v: {
+ # name = "koreader-${n}";
+ # value = v // {
+ # target = "${cfg.path}/${v.target}";
+ # };
+ # }) cfg.file;
- nickel.menu.items = mkIf cfg.nickelEntry {
+ nickel.menu.item = mkIf cfg.nickelEntry {
koreader = singleton {
location = "main";
label = "KOReader";