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