Calibre: Difference between revisions
m Fix formatting a bit |
Fix Wikipedia link |
||
| (7 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
[https://calibre-ebook.com/ Calibre] is program to view, edit, convert and print ebooks. | [https://calibre-ebook.com/ Calibre] is program to view, edit, convert, and print ebooks. | ||
== Installation == | |||
Calibre is available in [[nixpkgs]] as {{nixos:package|calibre}}. | |||
=== NixOS === | |||
Add the package to your NixOS configuration, in {{nixos:option|environment.systemPackages}}: | |||
== . | <syntaxhighlight lang="nix"> | ||
environment.systemPackages = with pkgs; [ | |||
calibre | |||
]; | |||
</syntaxhighlight> | |||
=== Home Manager === | |||
Add the package to your <code>[https://home-manager-options.extranix.com/?release=master&query=home.packages home.packages]</code>: | |||
<syntaxhighlight lang="nix"> | |||
home.packages = with pkgs; [ | |||
calibre | |||
]; | ]; | ||
</ | </syntaxhighlight> | ||
== Extras == | |||
=== Connecting USB devices === | |||
To connect devices via USB, you might have to add the following to your NixOS configuration: | |||
<syntaxhighlight lang="nix"> | |||
services.udisks2 = { | |||
enable = true; | |||
mountOnMedia = true; | |||
}; | |||
</syntaxhighlight> | |||
=== Opening <code>.cbr</code> files === | |||
<code>.cbr</code> files are comic book archives in the [[Wikipedia:RAR_(file_format)|RAR]] archive format. | |||
If you want to open <code>.cbr</code> files, replace <code>calibre</code> with the following in your NixOS or Home Manager configuration: | |||
<syntaxhighlight lang="nix"> | |||
(calibre.override { | |||
unrarSupport = true; | |||
}) | |||
</syntaxhighlight> | |||
{{note|<code>calibre</code> requires {{nixos:package|unrar}} to open .cbr files, which is an unfree package. This also causes <code>calibre</code> to be marked as unfree. If you are using [https://nixos.org/manual/nixpkgs/unstable/#sec-allow-unfree <code>allowUnfreePredicate</code>] you will need to ensure that your configurations permit all of them. | |||
For example, you can add this snippet to your NixOS configuration to allow <code>calibre</code> and <code>unrar</code>. | |||
< | <syntaxhighlight lang="nix"> | ||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ | |||
"calibre" | |||
"unrar" | |||
]; | |||
</syntaxhighlight> | |||
</ | |||
}} | }} | ||
== See also == | |||
* [[wikipedia:Calibre_(software)|Calibre on Wikipedia]] | |||
[[Category: Applications]] | [[Category: Applications]] | ||