diff options
| author | Chris Wells <chris@mathematicaster.org> | 2024-09-10 14:51:28 -0500 |
|---|---|---|
| committer | Chris Wells <chris@mathematicaster.org> | 2024-09-10 14:51:28 -0500 |
| commit | 4f471484b3a1e16230979a8406503a220b9101f4 (patch) | |
| tree | dc3f5256f275f34d3bcc9573462ed34c7fd97f77 /modules/kobo.nix | |
| parent | 5cb16c34a8c5b803ec723934c1dc828c0e8e3bad (diff) | |
| download | kobo-manager-4f471484b3a1e16230979a8406503a220b9101f4.tar kobo-manager-4f471484b3a1e16230979a8406503a220b9101f4.tar.gz kobo-manager-4f471484b3a1e16230979a8406503a220b9101f4.tar.bz2 kobo-manager-4f471484b3a1e16230979a8406503a220b9101f4.tar.lz kobo-manager-4f471484b3a1e16230979a8406503a220b9101f4.tar.xz kobo-manager-4f471484b3a1e16230979a8406503a220b9101f4.tar.zst kobo-manager-4f471484b3a1e16230979a8406503a220b9101f4.zip | |
I think this is almost working!
Diffstat (limited to 'modules/kobo.nix')
| -rw-r--r-- | modules/kobo.nix | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/modules/kobo.nix b/modules/kobo.nix deleted file mode 100644 index 1b59a21..0000000 --- a/modules/kobo.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ config, pkgs, lib, options, ... }: -with builtins // lib; -let - cfg = config.kobo; - ini = pkgs.formats.ini {}; - importOption = p: (import p { inherit pkgs lib; } cfg.path).option; -in { - options.kobo = { - enable = mkEnableOption "main configurations"; - - path = mkOption { - type = types.str; - default = ".kobo/Kobo"; - description = "Relative path to main Kobo config"; - }; - - devPath = mkOption { - type = types.str; - default = "/mnt/onboard/${cfg.path}" - readOnly = true; - internal = true; - }; - - file = importOption ./lib/file.nix; - manifest = importOption ./lib/manifest.nix; - - config = mkOption { - type = ini.type; - default = {}; - description = "https://wiki.mobileread.com/wiki/Kobo_Configuration_Options"; - }; - }; - - config = { - # file = mapAttrs' (n: v: { - # name = "kobo-${n}"; - # value = v // { - # target = "${cfg.path}/${v.target}"; - # }; - # }) cfg.file; - - # manifest = mapAttrs' (n: v: { - # name = "kobo-${n}"; - # value = v // { - # targets = map (x: "${cfg.path}/${x}") v.targets; - # }; - # }) cfg.manifest; - - kobo = { - config = { - FeatureSettings = { - ExcludeSyncFolders = ''(\.(?!kobo|adobe).+|([^.][^/]*/)+\..+)''; - }; - ApplicationPreferences = { - QuickTourShown = true; - }; - }; - file = mkMerge [ - (mkIf (cfg.config != {}) { - "Kobo eReader.conf".text = generators.toINI {} cfg.config; - }) - ]; - - manifest = { - "Kobo eReader.conf".mergeTool = local: remote: '' - ${getBin pkgs.crudini}/bin/crudini --merge "${remote}" < "${local}" - ''; - }; - }; - - - }; -} |
