Emacs daemon does not start

Emacs daemon will not start even though my configuration.nix contains the following:

services.emacs = {
  enable = true;
  defaultEditor = true;
}

What might be the problem here?

1 Like

Please run systemctl --user status emacs.service and tell us the output.

Here is the output

Unit emacs.service could not be found.

Did you do a demon reload and or reboot after the switch?

nixos-rebuild doesn’t reload user demons IIRC.

Yes, I have reloaded and rebooted.

And you really passed the --user flag?

Yes.

I failed to mention that this issue occurred after running nixos-rebuild switch --upgrade (I don’t know if this is related to the issue).