2024-09-30 05:50:35 -06:00
|
|
|
{ pkgs
|
2024-09-06 09:49:49 -06:00
|
|
|
, isUnstable
|
|
|
|
, lib
|
2024-09-30 18:31:46 -06:00
|
|
|
, config
|
2023-09-12 08:44:05 -06:00
|
|
|
, ...
|
|
|
|
}:
|
2024-09-06 09:49:49 -06:00
|
|
|
let
|
|
|
|
myEmacs = pkgs.callPackage ../pkgs/emacs.nix { inherit isUnstable; };
|
2024-09-30 18:31:46 -06:00
|
|
|
cfg = config.myEmacs;
|
2024-09-06 09:49:49 -06:00
|
|
|
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
|
|
|
|
{
|
2024-09-30 18:31:46 -06:00
|
|
|
options = {
|
|
|
|
myEmacs = {
|
2024-10-01 07:23:59 -06:00
|
|
|
enable = lib.mkOption {
|
|
|
|
description = "Enable my emacs stuff";
|
|
|
|
default = true;
|
|
|
|
};
|
2024-09-30 18:31:46 -06:00
|
|
|
};
|
|
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
2024-09-06 09:49:49 -06:00
|
|
|
environment = {
|
|
|
|
variables.EDITOR = lib.mkOverride 900 "emacseditor";
|
|
|
|
systemPackages = with pkgs; [
|
|
|
|
(aspellWithDicts (dicts: with dicts; [ en en-computers es de ]))
|
|
|
|
go-font
|
2024-09-30 05:50:35 -06:00
|
|
|
|
2024-09-06 19:14:51 -06:00
|
|
|
graphviz
|
2022-08-25 12:21:35 -06:00
|
|
|
|
2024-09-06 09:49:49 -06:00
|
|
|
myEmacs
|
|
|
|
editorScript
|
2024-09-30 05:50:35 -06:00
|
|
|
]
|
|
|
|
++ lib.optionals (pkgs.system == "x86_64-linux") [ texlive.combined.scheme-full ];
|
2024-07-12 08:39:40 -06:00
|
|
|
};
|
|
|
|
};
|
2023-09-12 08:44:05 -06:00
|
|
|
}
|