From c3052ddc4e54092bfc9220d550ab4d8fcba166de Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Wed, 11 Sep 2024 10:50:30 -0500 Subject: The modules seem fairly solid now. Now to write the cli --- modules/plato/default.nix | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-) (limited to 'modules/plato/default.nix') diff --git a/modules/plato/default.nix b/modules/plato/default.nix index 74fe8c1..8312912 100644 --- a/modules/plato/default.nix +++ b/modules/plato/default.nix @@ -70,31 +70,6 @@ in { cfg.package.KoboRoot ]; }; - # pkgs.symlinkJoin { - # name = "plato-package"; - # paths = [ - # cfg._createdFiles - # # (pkgs.linkFarm "plato-files" [{ - # # name = removePrefix "/" cfg.devicePath; - # # path = cfg.package.out; - # # }]) - # (pkgs.runCommandLocal "plato-files" {} '' - # mkdir -p "$(dirname "$out${cfg.devicePath}")" - # cp -r "${cfg.package.out}" "$out${cfg.devicePath}" - # '') - # cfg.package.KoboRoot - # ]; - # }; - }; - - _allFiles = mkOption { - type = types.package; - readOnly = true; - internal = true; - default = pkgs.symlinkJoin { - name = "plato-files"; - paths = mapAttrsToList (_: v: v._package) cfg.file ++ [ cfg.package ]; - }; }; file = mkOption { @@ -104,7 +79,7 @@ in { }; nickel = { - enable = mkEnableOption "Add NickelMenu option" // { default = true; }; + enable = mkEnableOption "Add NickelMenu option" // { default = ! config.kfmon.enable; }; }; @@ -153,7 +128,7 @@ in { default = let copyDicts = pkg: '' - find ${pkg}/share/dictd/ -type f -regex '.*\.\(dict\(\.dz\)?\|index\)' -exec cp -v {} $out/ \; + find ${pkg}/ -type f -regex '^.*\.\(dict\(\.dz\)?\|index\)$' -exec cp -v {} $out/ \; ''; in pkgs.runCommandLocal "plato-dictionaries" {} '' mkdir $out @@ -173,7 +148,7 @@ in { default = let copyFonts = pkg: '' - find ${pkg}/share/fonts/ -type f -regex '.*\.\(ttf\|otf\)' -exec cp -v {} $out/ \; + find ${pkg}/ -type f -regex '^.*\.\(ttf\|otf\)$' -exec cp -v {} $out/ \; ''; in pkgs.runCommandLocal "plato-fonts" {} '' mkdir $out @@ -231,6 +206,18 @@ in { ]; }; }; + + kfmon.configs.plato.watch = { + filename = "/mnt/onboard/icons/plato.png"; + action = "${cfg.devicePath}/plato.sh"; + label = "Plato"; + hidden = 0; + block_spawns = 1; + do_db_update = 0; + db_title = "Plato"; + db_author = "Baskerville"; + db_comment = "A document reader"; + }; }) ]; } -- cgit v1.2.3