2024-05-07 18:02:59 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-05-01 21:10:26 -04:00
|
|
|
|
|
|
|
let
|
2024-05-07 18:02:59 -04:00
|
|
|
cfg = config.host.apps.writing;
|
2024-05-01 21:10:26 -04:00
|
|
|
in
|
|
|
|
with lib;
|
|
|
|
{
|
2024-05-07 18:02:59 -04:00
|
|
|
options = {
|
|
|
|
host.apps.writing.enable = mkEnableOption (mdDoc "Enables writing and editing tools");
|
|
|
|
};
|
2024-05-01 21:10:26 -04:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
# Install packages for building ebooks
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
haskellPackages.pandoc
|
|
|
|
haskellPackages.pandoc-cli
|
|
|
|
haskellPackages.pandoc-crossref
|
|
|
|
texliveSmall
|
|
|
|
];
|
2024-05-01 21:10:26 -04:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
# Spelling and grammer checking: hosted on localhost:8081
|
|
|
|
services.languagetool = {
|
|
|
|
enable = true;
|
|
|
|
port = 8090;
|
|
|
|
public = false;
|
|
|
|
allowOrigin = "*";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|