xin/configs/emacs.nix

33 lines
739 B
Nix
Raw Permalink Normal View History

{ config
2023-09-12 08:44:05 -06:00
, pkgs
, isUnstable
, lib
2023-09-12 08:44:05 -06:00
, ...
}:
let
myEmacs = pkgs.callPackage ../pkgs/emacs.nix { inherit isUnstable; };
editorScript = pkgs.writeShellScriptBin "emacseditor" ''
if [ -z "$1" ]; then
exec ${myEmacs}/bin/emacsclient --create-frame --alternate-editor ${myEmacs}/bin/emacs
else
exec ${myEmacs}/bin/emacsclient --alternate-editor ${myEmacs}/bin/emacs "$@"
fi
'';
in
{
config = {
environment = {
variables.EDITOR = lib.mkOverride 900 "emacseditor";
systemPackages = with pkgs; [
(aspellWithDicts (dicts: with dicts; [ en en-computers es de ]))
go-font
texlive.combined.scheme-full
graphviz
2022-08-25 12:21:35 -06:00
myEmacs
editorScript
];
2024-07-12 08:39:40 -06:00
};
};
2023-09-12 08:44:05 -06:00
}