aboutsummaryrefslogtreecommitdiff
path: root/modules/koreader.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/koreader.nix')
-rw-r--r--modules/koreader.nix55
1 files changed, 0 insertions, 55 deletions
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"
- ];
- };
- };
- };
-}