diff options
| author | Chris Wells <chris@mathematicaster.org> | 2026-10-28 01:20:16 -0400 |
|---|---|---|
| committer | Chris Wells <chris@mathematicaster.org> | 2026-10-28 01:20:16 -0400 |
| commit | f9bdbf51aa61503d77e387095e7a4e1f34acdde3 (patch) | |
| tree | 22623c6b8e43ff003de6079d7f70cef3dc2f7c13 /modules/main.nix | |
| download | ko-manager-f9bdbf51aa61503d77e387095e7a4e1f34acdde3.tar ko-manager-f9bdbf51aa61503d77e387095e7a4e1f34acdde3.tar.gz ko-manager-f9bdbf51aa61503d77e387095e7a4e1f34acdde3.tar.bz2 ko-manager-f9bdbf51aa61503d77e387095e7a4e1f34acdde3.tar.lz ko-manager-f9bdbf51aa61503d77e387095e7a4e1f34acdde3.tar.xz ko-manager-f9bdbf51aa61503d77e387095e7a4e1f34acdde3.tar.zst ko-manager-f9bdbf51aa61503d77e387095e7a4e1f34acdde3.zip | |
First few files
Diffstat (limited to 'modules/main.nix')
| -rw-r--r-- | modules/main.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/modules/main.nix b/modules/main.nix new file mode 100644 index 0000000..b568efa --- /dev/null +++ b/modules/main.nix @@ -0,0 +1,48 @@ +{ + config, + pkgs, + lib, + ... +}: +with builtins // lib; +{ + imports = [ + ./files.nix + ]; + + options = { + koreader = { + flavor = mkOption { + type = + with types; + nullOr + <| enum [ + "kobo" + "pocketbook" + ]; + default = null; + }; + basePackage = mkOption { + type = types.package; + }; + koreaderPath = mkOption { + type = types.str; + }; + }; + }; + + config = mkMerge [ + (mkIf (config.koreader.flavor == "kobo") { + koreader = { + basePackage = mkOptionDefault pkgs.koreader-kobo; + koreaderPath = mkOptionDefault ".adds/koreader"; + }; + }) + (mkIf (config.koreader.flavor == "pocketbook") { + koreader = { + basePackage = mkOptionDefault pkgs.koreader-pocketbook; + koreaderPath = mkOptionDefault "applications/koreader"; + }; + }) + ]; +} |
