Break out Language Tool options, disable on Khanda to save RAM
This commit is contained in:
parent
fc0494bb63
commit
d02e21ce15
14
flake.lock
14
flake.lock
|
@ -138,11 +138,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718788307,
|
||||
"narHash": "sha256-SqiOz0sljM0GjyQEVinPXQxaGcbOXw5OgpCWGPgh/vo=",
|
||||
"lastModified": 1719037157,
|
||||
"narHash": "sha256-aOKd8+mhBsLQChCu1mn/W5ww79ta5cXVE59aJFrifM8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d7830d05421d0ced83a0f007900898bdcaf2a2ca",
|
||||
"rev": "cd886711998fe5d9ff7979fdd4b4cbd17b1f1511",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -252,11 +252,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1718894893,
|
||||
"narHash": "sha256-hxQBUtDbFOCCW1CsFZTS9Q5Ov1ZKdJgbBZHSez1M6iA=",
|
||||
"lastModified": 1719069430,
|
||||
"narHash": "sha256-d9KzCJv3UG6nX9Aur5OSEf4Uj+ywuxojhiCiRKYVzXA=",
|
||||
"ref": "master",
|
||||
"rev": "083823b7904e43a4fc1c7229781417e875359a42",
|
||||
"revCount": 1733,
|
||||
"rev": "e8232c132a95ddc62df9d404120ad4ff53862910",
|
||||
"revCount": 1741,
|
||||
"type": "git",
|
||||
"url": "https://github.com/NixOS/nixos-hardware"
|
||||
},
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
social.enable = true;
|
||||
writing = {
|
||||
enable = true;
|
||||
ngrams.enable = false;
|
||||
languagetool.enable = false;
|
||||
};
|
||||
};
|
||||
ui = {
|
||||
|
|
|
@ -12,10 +12,13 @@ in
|
|||
options = {
|
||||
host.apps.writing = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "Enables writing and editing tools");
|
||||
# WARNING: Ngrams package requires an excessive amount of memory. Troubleshoot before re-enabling
|
||||
ngrams.enable = lib.mkEnableOption (
|
||||
lib.mdDoc "Enables ngrams for improved grammar detection (warning: results in an 8GB+ download)."
|
||||
);
|
||||
languagetool = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "Enables local Language Tool server.");
|
||||
# WARNING: Ngrams package requires an excessive amount of memory. Troubleshoot before re-enabling
|
||||
ngrams.enable = lib.mkEnableOption (
|
||||
lib.mdDoc "Enables ngrams for improved grammar detection (warning: results in an 8GB+ download)."
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -29,13 +32,13 @@ in
|
|||
];
|
||||
|
||||
# Spelling and grammer checking: hosted on localhost:8081
|
||||
services.languagetool = {
|
||||
services.languagetool = lib.mkIf cfg.languagetool.enable {
|
||||
enable = true;
|
||||
port = 8090;
|
||||
public = false;
|
||||
allowOrigin = "*";
|
||||
# Enable Ngrams
|
||||
settings.languageModel = lib.mkIf cfg.ngrams.enable "${
|
||||
settings.languageModel = lib.mkIf cfg.languagetool.ngrams.enable "${
|
||||
(pkgs.callPackage ../../packages/languagetool-ngrams.nix { inherit pkgs lib; })
|
||||
}/ngrams";
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue