Merge branch 'emacs_refactor' into nix

This commit is contained in:
Tom Alexander 2025-01-19 10:16:27 -05:00
commit 2aca77ea1a
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -43,39 +43,65 @@ in
{ {
imports = [ ]; imports = [ ];
environment.systemPackages = with pkgs; [ config = lib.mkMerge [
plainmacs
e_shorthand
emacs29-pgtk
clang # To compile tree-sitter grammars
nixd # nix language server
nixfmt-rfc-style # auto-formatting nix files through nixd
];
home-manager.users.talexander =
{ pkgs, ... }:
{ {
home.file.".config/emacs" = { environment.systemPackages = with pkgs; [
source = ./files/emacs; plainmacs
recursive = true; e_shorthand
emacs_full
];
nixpkgs.overlays = [
(final: prev: {
emacs_full = pkgs.symlinkJoin {
name = "emacs_full";
paths = [ pkgs.emacs29-pgtk ];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/emacs --prefix PATH : ${
lib.makeBinPath [
(pkgs.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
]
}
'';
};
})
];
home-manager.users.talexander =
{ pkgs, ... }:
{
home.file.".config/emacs" = {
source = ./files/emacs;
recursive = true;
};
};
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
hideMounts = true;
users.talexander = {
directories = [
".config/emacs/eln-cache" # Installed packages
".config/emacs/elpa" # Installed packages
".config/emacs/private" # For recentf
".config/emacs/tree-sitter" # Compiled tree-sitter grammars
];
files = [
".config/emacs/history" # For savehist
".config/emacs/.last-package-update-day" # For use-package
];
};
}; };
};
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) { environment.variables.EDITOR = "${plainmacs}/bin/plainmacs";
hideMounts = true; }
users.talexander = { ];
directories = [
".config/emacs/eln-cache" # Installed packages
".config/emacs/elpa" # Installed packages
".config/emacs/private" # For recentf
".config/emacs/tree-sitter" # Compiled tree-sitter grammars
];
files = [
".config/emacs/history" # For savehist
".config/emacs/.last-package-update-day" # For use-package
];
};
};
environment.variables.EDITOR = "${plainmacs}/bin/plainmacs";
} }