From 4f471484b3a1e16230979a8406503a220b9101f4 Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Tue, 10 Sep 2024 14:51:28 -0500 Subject: I think this is almost working! --- modules/koreader.nix | 55 ---------------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 modules/koreader.nix (limited to 'modules/koreader.nix') diff --git a/modules/koreader.nix b/modules/koreader.nix deleted file mode 100644 index 5bcca42..0000000 --- a/modules/koreader.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ config, pkgs, lib, options, ... }: -with builtins // lib; -let - cfg = config.koreader; - importOption = p: (import p { inherit pkgs lib; } cfg.path).option; -in { - options.koreader = { - enable = mkEnableOption "KOReader"; - - path = mkOption { - type = types.str; - default = ".adds/koreader"; - description = "Relative path to KOReader within src"; - }; - - devPath = mkOption { - type = types.str; - default = "/mnt/onboard/${cfg.path}"; - readOnly = true; - internal = true; - }; - - nickelEntry = mkEnableOption "Launch KOReader directly via nickelMenu"; - - 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; - - nickel.menu.item = mkIf cfg.nickelEntry { - koreader = singleton { - location = "main"; - label = "KOReader"; - action = "cmd_spawn"; - arg = [ - "quiet" - "exec ${cfg.devPath}/koreader.sh" - ]; - }; - }; - }; -} -- cgit v1.2.3