Add support for non-graphical emacs.
This commit is contained in:
parent
054e056d00
commit
e0644a069d
@ -63,9 +63,9 @@ in
|
||||
lib.mkMerge [
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
emacs29-pgtk
|
||||
(plainmacs emacs29-pgtk)
|
||||
(e_shorthand emacs29-pgtk)
|
||||
my_emacs
|
||||
(plainmacs my_emacs)
|
||||
(e_shorthand my_emacs)
|
||||
];
|
||||
|
||||
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
|
||||
@ -84,35 +84,49 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
environment.variables.EDITOR = "${pkgs.emacs29-pgtk}/bin/plainmacs";
|
||||
environment.variables.EDITOR = "${pkgs.my_emacs}/bin/plainmacs";
|
||||
}
|
||||
(lib.mkIf (config.me.graphical) {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
my_emacs = final.emacs29-pgtk;
|
||||
})
|
||||
];
|
||||
})
|
||||
(lib.mkIf (!config.me.graphical) {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
my_emacs = final.emacs-nox;
|
||||
})
|
||||
];
|
||||
})
|
||||
(lib.mkIf (config.me.emacs_flavor == "full") {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
emacs29-pgtk = pkgs.buildEnv {
|
||||
name = prev.emacs29-pgtk.name;
|
||||
my_emacs = pkgs.buildEnv {
|
||||
name = prev.my_emacs.name;
|
||||
paths = with prev; [
|
||||
emacs29-pgtk
|
||||
my_emacs
|
||||
];
|
||||
extraOutputsToInstall = [
|
||||
"man"
|
||||
"doc"
|
||||
"info"
|
||||
];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
buildInputs = [ final.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/emacs --prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
(pkgs.aspellWithDicts (
|
||||
(final.aspellWithDicts (
|
||||
dicts: with dicts; [
|
||||
en
|
||||
en-computers
|
||||
]
|
||||
))
|
||||
pkgs.nixd # nix language server
|
||||
pkgs.nixfmt-rfc-style # auto-formatting nix files through nixd
|
||||
pkgs.clang # To compile tree-sitter grammars
|
||||
pkgs.shellcheck
|
||||
final.nixd # nix language server
|
||||
final.nixfmt-rfc-style # auto-formatting nix files through nixd
|
||||
final.clang # To compile tree-sitter grammars
|
||||
final.shellcheck
|
||||
]
|
||||
}
|
||||
'';
|
||||
@ -132,10 +146,10 @@ in
|
||||
(lib.mkIf (config.me.emacs_flavor == "plainmacs") {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
emacs29-pgtk = pkgs.buildEnv {
|
||||
name = prev.emacs29-pgtk.name;
|
||||
my_emacs = pkgs.buildEnv {
|
||||
name = prev.my_emacs.name;
|
||||
paths = with prev; [
|
||||
emacs29-pgtk
|
||||
my_emacs
|
||||
];
|
||||
extraOutputsToInstall = [
|
||||
"man"
|
||||
|
Loading…
x
Reference in New Issue
Block a user