about summary refs log tree commit diff
path: root/users/sterni/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'users/sterni/emacs')
-rw-r--r--users/sterni/emacs/default.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/users/sterni/emacs/default.nix b/users/sterni/emacs/default.nix
index 8b2304f7aa13..212abfc75854 100644
--- a/users/sterni/emacs/default.nix
+++ b/users/sterni/emacs/default.nix
@@ -1,6 +1,8 @@
-{ depot, pkgs, ... }:
+{ depot, pkgs, lib, ... }:
 
 let
+  inherit (pkgs.stdenv.hostPlatform) is64bit;
+
   # emacsPgtkNativeComp is defined in emacs-overlay
   emacs = (pkgs.emacsPackagesFor pkgs.emacsPgtkNativeComp).withPackages (epkgs: [
     epkgs.bqn-mode
@@ -19,7 +21,6 @@ let
     epkgs.melpaPackages.haskell-mode
     epkgs.melpaPackages.hl-todo
     epkgs.melpaPackages.jq-mode
-    epkgs.melpaPackages.languagetool
     epkgs.melpaPackages.lsp-haskell
     epkgs.melpaPackages.lsp-mode
     epkgs.melpaPackages.lsp-ui
@@ -42,6 +43,8 @@ let
     epkgs.dash
     epkgs.s
     epkgs.jiralib2
+  ] ++ lib.optionals is64bit [
+    epkgs.melpaPackages.languagetool
   ]);
 
   configDirectory = pkgs.symlinkJoin {
@@ -54,11 +57,15 @@ let
         text = ''
           ;; bqn-mode
           (setq bqn-interpreter-path "${pkgs.cbqn}/bin/BQN")
+        ''
+        # Java doesn't seem to be available for non 64bit platforms in nixpkgs
+        + lib.optionalString is64bit ''
 
           ;; languagetool
           (setq languagetool-java-bin "${pkgs.jre}/bin/java"
                 languagetool-console-command "${pkgs.languagetool}/share/languagetool-commandline.jar"
                 languagetool-server-command "${pkgs.languagetool}/share/languagetool-server.jar")
+          '' + ''
 
           ;; use bash instead of fish from SHELL for some things, as it plays
           ;; nicer with TERM=dumb, as I don't need/want vterm anyways.