diff options
author | Azat Bahawi <azat@bahawi.net> | 2023-12-03 02:52:28 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2023-12-03 02:52:28 +0300 |
commit | cec9f7acd5e5e365563212c5144394f71dd90b27 (patch) | |
tree | 667b308a7241ab2e8f3fa4e2b53cc7888e876c68 /modules/common/emacs/default.nix | |
parent | 2023-11-29 (diff) |
2023-12-03
Diffstat (limited to '')
-rw-r--r-- | modules/common/emacs/default.nix | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/modules/common/emacs/default.nix b/modules/common/emacs/default.nix index 94c7729..5402b34 100644 --- a/modules/common/emacs/default.nix +++ b/modules/common/emacs/default.nix @@ -66,13 +66,15 @@ in { extraBins = with pkgs; [ (aspellWithDicts (p: with p; [en ru])) # :checkers (spell +aspell) + # wordnet # :tools (lookup +dictionary +offline) asmfmt # :editor format - bashdb # :lang sh :tools debugger cargo # :lang rust clang-tools # :lang (cc +lsp) :editor format cmake # :lang cc :term vterm cmake-format # :lang cc :editor format cmigemo # :lang japanese + config.hm.programs.emacs.package # !doom + config.nix.package # !doom dockerfile-language-server-nodejs # :tools (docker +lsp) dockfmt # :tools docker :editor format editorconfig-core-c # :tools editorconfig @@ -137,7 +139,6 @@ in { texlab # lang (tex +lsp) texlive.combined.scheme-full # :lang org tex unzip # :tools debugger - wordnet # :tools (lookup +dictionary +offline) yaml-language-server # :lang (yaml +lsp) zig # :lang zig :editor format zls # :lang (zig +lsp) @@ -151,6 +152,11 @@ in { then [gdb] # :tools debugger else [lldb] # :tools debugger ); + + parinferRustLibrary = + if (hasSuffix "linux" this.system) + then "${pkgs.parinfer-rust}/lib/libparinfer_rust.so" + else "${pkgs.parinfer-rust}/lib/libparinfer_rust.dylib"; in '' ;; Integrate packages which are required by various modules ;; without polluting the user's profile. @@ -181,7 +187,7 @@ in { ;; :editor parinfer (setq parinfer-rust-auto-download nil - parinfer-rust-library "${pkgs.parinfer-rust}/lib/libparinfer_rust.so") + parinfer-rust-library "${parinferRustLibrary}") ;; :lang nix ;; HACK Trick `nix-mode' to use alejandra instead of nixfmt. @@ -239,18 +245,7 @@ in { programs = { emacs = { enable = true; - package = - (pkgs.emacs29.override (finalAttrs: { - stdenv = pkgs.useMoldLinker finalAttrs.stdenv; - })) - .overrideAttrs (_: final: { - configureFlags = - (final.configureFlags or []) - ++ [ - "--without-mailutils" - "--without-pop" - ]; - }); + package = pkgs.emacs29; }; bash.initExtra = mkAfter '' @@ -268,6 +263,10 @@ in { vterm_cmd find-file "$(realpath "''${@:-.}")" } fi + + # Not sourced from inside Emacs for some reason. Maybe it's not + # considered an interactive shell? + [[ -f ~/.profile ]] && . ~/.profile ''; }; }; |