lambda to import recursive files on all modules

This commit is contained in:
2024-10-02 19:22:53 -06:00
parent 933f52d4ee
commit 46f6fc626f
27 changed files with 72 additions and 85 deletions

60
modules/dev/emacs.nix Normal file
View File

@@ -0,0 +1,60 @@
{
config,
lib,
pkgs,
...
}:
{
options.my.emacs.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.emacs.enable {
home-manager.users.jawz = {
services.lorri.enable = true;
programs.bash = {
initExtra = ''
emacs-sqlite-fix () {
nix-shell -p cmake sqlite --command "doom sync &&
sc restart emacs &&
emacsclient -e '(org-roam-db-sync)'" &&
doom sync
}
'';
shellAliases = {
edit = "emacsclient -t";
e = "edit";
};
};
};
users.users.jawz.packages =
(with pkgs; [
fd # modern find, faster searches
fzf # fuzzy finder! super cool and useful
ripgrep # modern grep
tree-sitter # code parsing based on symbols and shit, I do not get it
graphviz # graphs
tetex # export pdf
languagetool # proofreader for English
# doom everywhere
xorg.xwininfo
xdotool
xclip
# lsps
yaml-language-server
markdownlint-cli
])
++ (with pkgs.nodePackages; [
vscode-json-languageserver
# linters
prettier
]);
services.emacs = {
enable = true;
package =
with pkgs;
((emacsPackagesFor emacs-gtk).emacsWithPackages (epkgs: with epkgs; [ vterm ]));
defaultEditor = true;
};
environment.variables.PATH = [ "\${XDG_CONFIG_HOME}/emacs/bin" ];
};
}