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