{ pkgs, config, ... }: let username = config.defaultUser or "henrov"; in { environment.systemPackages = [ pkgs.emacs-pgtk.override { withTreeSitter = true; } ]; home-manager.users.${username} = { home.stateVersion = "26.05"; programs.emacs = { enable = true; package = pkgs.emacs-pgtk.override { withTreeSitter = true; }; extraPackages = epkgs: with epkgs; [ #(epkgs.manualPackages.treesit-grammars.override { withAllGrammars = true; }) rust-mode rustic nix-mode hcl-mode nerd-icons doom-modeline diminish eldoc eldoc-box pulsar which-key avy consult vertico marginalia crux shell-pop nerd-icons-corfu corfu cape orderless yasnippet yasnippet-snippets rg exec-path-from-shell eat f gptel nixpkgs-fmt envrc catppuccin-theme magit expreg vundo puni sideline sideline-flymake sideline-eglot ]; # Load your init.el via extraConfig extraConfig = builtins.readFile ./init.el; }; home.sessionVariables = { EDITOR = "emacs"; XDG_SCREENSHOTS_DIR = "~/screenshots"; }; }; }