Setup emacs server

This commit is contained in:
Curt Spark 2024-04-12 13:17:45 +01:00
parent 0adc39744a
commit a8e26d1a33
2 changed files with 28 additions and 2 deletions

View File

@ -58,7 +58,7 @@ in
firefox
librewolf
ungoogled-chromium
emacs-gtk
# emacs-gtk
telegram-desktop
discord
lutris
@ -182,6 +182,12 @@ in
};
};
# Emacs install and enable daemon/server mode. Set to use unstable pure gtk branch (From emacs-overlay)
services.emacs = {
enable = true;
package = pkgs.emacs-gtk;
};
# MPDCRON to automate MPD related events, using it to automatically restart mpd-discord-rpc service to solve issues
systemd.user.services.mpdcron = let
script = pkgs.writeShellScript "mpdcron-script"
@ -224,7 +230,7 @@ in
];
home.sessionVariables = {
EDITOR = "emacs -nw";
EDITOR = "emacsclient -nw";
# Dotnet path not found fix
DOTNET_ROOT = "${pkgs.dotnet-sdk}";

View File

@ -13,6 +13,7 @@
environment.systemPackages = with pkgs; [
nix-index
git
gcc
nodejs
nodePackages.prettier
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
@ -165,6 +166,25 @@
";
};
# Emacs install and enable daemon/server mode.
services.emacs = {
enable = true;
package = pkgs.emacs-gtk;
};
systemd.services.emacs = {
description = "Emacs server daemon for root";
wantedBy = [ "multi-user.target" ];
path = with pkgs; [ emacs-gtk ];
enable = true;
serviceConfig = {
User = "root";
Group = "root";
};
script = "
emacs --daemon
";
};
# Virt Manager Installation
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;