emacs and random stuff

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2023-01-07 05:11:25 +05:30
parent 2ff04267b6
commit 01ab8d54b9
9 changed files with 52 additions and 228 deletions

31
home/natto/emacs.nix Normal file
View File

@@ -0,0 +1,31 @@
{ config, pkgs, inputs, ... }:
let
mymacs = config: # with inputs.emacs-overlay.packages.${pkgs.system}; already resolved with overlay
with pkgs; emacsWithPackagesFromUsePackage {
inherit config;
package = emacsNativeComp;
alwaysEnsure = true;
alwaysTangle = true;
extraEmacsPackages = epkgs: with epkgs; [
use-package
(epkgs.tree-sitter-langs.withPlugins (_: epkgs.tree-sitter-langs.plugins))
];
};
in
{
home.file = with config; {
"config.org" = {
source = ./config/emacs/config.org;
target = "${home.homeDirectory}/.emacs.d/config.org";
};
"init.el" = {
source = ./config/emacs/init.el;
target = "${home.homeDirectory}/.emacs.d/init.el";
};
};
programs.emacs = {
enable = true;
package = mymacs ./config/emacs/config.org;
};
services.emacs.enable = true;
}