Messed up my Emacs config in home.nix

I managed to set up my home Emacs config in ~/.config/nixpkgs using home-manager. Can anyone see why?

  programs.emacs = {
    enable = true;
    package = pkgs.emacs29-gtk3;
    extraConfig = ''
      (setq standard-indent 2)
      (setq inhibit-startup-screen t)
      (setq initial-scratch-message "")

      ;; Set up MELPA package repository
      (require 'package)
      (add-to-list 'package-archives '("melpa" . "") t)
      (setq package-check-signature nil)

      ;; Basic modes
      (tool-bar-mode -1)
      (menu-bar-mode -1)
      (scroll-bar-mode -1)
      (blink-cursor-mode -1)
      (column-number-mode +1)
      (global-visual-line-mode +1)
      (delete-selection-mode +1)
      (save-place-mode +1)
      (display-time-mode 1)
      (winner-mode 1)
      (global-goto-address-mode 1)
      (savehist-mode 1)
      (repeat-mode 1)
      (context-menu-mode 1)
      (recentf-mode 1)

    # Enable emacsclient as default editor
    services.emacs.defaultEditor = true;
    services.emacs.enable = true;


Not sure what I did but it won’t work now. It first told me that the folder was obsolete (not such message before) and then generated error messages I could not follow.

Can you share the error messages too? Nearly impossible to spot from just this.

1 Like

I removed home-manager and reinstalled as per instructions on their git website. The config works now.