Apps: remove LanguageTool (again) and use a self-hosted service instead
This commit is contained in:
parent
dc8a4c700a
commit
ee1a10564a
|
@ -23,7 +23,7 @@ function usage() {
|
|||
|
||||
function run_operation {
|
||||
echo "Full operation: nixos-rebuild $1 --flake $flakeDir#$hostname $( [ "$buildHost" != "" ] && echo "--build-host $buildHost" ) $remainingArgs --use-remote-sudo"
|
||||
nixos-rebuild $operation --flake .#$hostname $remainingArgs --use-remote-sudo
|
||||
nixos-rebuild $operation --flake .#$hostname $remainingArgs --use-remote-sudo --log-format multiline-with-logs
|
||||
|
||||
# Only request super-user permission if we're switching
|
||||
#if [[ "$1" =~ ^(switch|boot|test)$ ]]; then
|
||||
|
|
|
@ -25,13 +25,7 @@ in
|
|||
office.enable = true;
|
||||
recording.enable = true;
|
||||
social.enable = true;
|
||||
writing = {
|
||||
enable = true;
|
||||
languagetool = {
|
||||
enable = true;
|
||||
ngrams.enable = true;
|
||||
};
|
||||
};
|
||||
writing.enable = true;
|
||||
};
|
||||
|
||||
# Enable Secure Boot support.
|
||||
|
|
|
@ -52,11 +52,7 @@ in
|
|||
# Enable GPU support.
|
||||
gpu.amd.enable = true;
|
||||
|
||||
nixos-upgrade-script = {
|
||||
enable = true;
|
||||
configDir = config.secrets.nixConfigFolder;
|
||||
user = config.users.users.aires.name;
|
||||
};
|
||||
nixos-upgrade-script.enable = true;
|
||||
|
||||
packages = with pkgs; [
|
||||
boinc # Boinc client
|
||||
|
|
|
@ -10,17 +10,7 @@ let
|
|||
in
|
||||
{
|
||||
options = {
|
||||
aux.system.apps.writing = {
|
||||
enable = lib.mkEnableOption "Enables writing and editing tools";
|
||||
|
||||
languagetool = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "Enables local Language Tool server.");
|
||||
# WARNING: Ngrams package requires a lot of RAM
|
||||
ngrams.enable = lib.mkEnableOption (
|
||||
lib.mdDoc "Enables ngrams for improved grammar detection (warning: results in an 8GB+ download)."
|
||||
);
|
||||
};
|
||||
};
|
||||
aux.system.apps.writing.enable = lib.mkEnableOption "Enables writing and editing tools";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -31,17 +21,5 @@ in
|
|||
haskellPackages.pandoc-crossref
|
||||
texliveSmall
|
||||
];
|
||||
|
||||
# Spelling and grammer checking: hosted on localhost:8081
|
||||
services.languagetool = lib.mkIf cfg.languagetool.enable {
|
||||
enable = true;
|
||||
port = 8090;
|
||||
public = false;
|
||||
allowOrigin = "*";
|
||||
# Enable Ngrams
|
||||
settings.languageModel = lib.mkIf cfg.languagetool.ngrams.enable "${
|
||||
(pkgs.callPackage ../../packages/languagetool-ngrams.nix { inherit pkgs lib; })
|
||||
}/share/languagetool/ngrams";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue