I’m trying to set up emacs here’s my bare bones config:
services.emacs.enable = true;
programs.emacs = {
enable = true;
package = pkgs.emacs; # replace with pkgs.emacs-gtk, or a version provided by the community overlay if desired.
extraPackages = epkgs: [ epkgs.dracula-theme ];
extraConfig = ''
(setq standard-indent 2)
'';
};
issues are is that it isn’t making the tab indents two spaces and I’m trying to look around for examples to see what to do but there isn’t any
Can you check if the file is generated into ~/.config/emacs? Do you perhaps by any chance already have ~/.emacs.d. GNU Emacs have transitioned to the new folders, but if the old ones exist they will take precedence. I do have an Emacs configuration using home manager, but I’m also using a bunch of other tools to manage it, so it is probably not what you are looking for:
programs.emacs.extraConfig doesn’t place configuration files under the home directory. It instead generates default.el, which is added to load-path by a launcher script generated by Home Manager.
default.el is the initialization script meant for use by downstream. Notably, it doesn’t load if inhibit-default-init is set.
Do you by any chance use Emacs configuration frameworks like Doom Emacs? I forgot about this, but I use Doom Emacs and it disables the loading of default.el. I had to load it explicitly in my configuration.
I also keep my Emacs configuration outside of Nix. Well, mostly. But FWIW programs.emacs.extraConfig is useful when you need to refer to Nix store paths in your Emacs configuration.
no I do not, I’m manually configuring. I might just use the other replies solution of having my emacs configuration outside of nix. It sucks but whtever