diff --git a/users/common/programs.nix b/users/common/programs.nix index 61c2bf0..60fb60d 100644 --- a/users/common/programs.nix +++ b/users/common/programs.nix @@ -57,7 +57,7 @@ interactiveShellInit = "nix-your-shell fish | source"; loginShellInit = "nix-your-shell fish | source"; shellAliases = { - nano = "micro"; + emacs = "${config.home.sessionVariables.EDITOR} -nw"; wget = ''wget --hsts-file="$XDG_DATA_HOME/wget-hsts"''; }; functions = { diff --git a/users/common/services.nix b/users/common/services.nix index b3d08a4..9c716f3 100644 --- a/users/common/services.nix +++ b/users/common/services.nix @@ -4,7 +4,7 @@ services.emacs = { enable = true; defaultEditor = true; + package = pkgs.emacs29-pgtk; socketActivation.enable = true; - client.enable = true; }; } diff --git a/users/desktops/common/home.nix b/users/desktops/common/home.nix index 76eaf47..39f778f 100644 --- a/users/desktops/common/home.nix +++ b/users/desktops/common/home.nix @@ -25,4 +25,29 @@ "/var/run/current-system/sw/share/applications/koi.desktop"; }; }; + xdg.desktopEntries.emacsd = { + name = "Emacs"; + exec = "${config.services.emacs.package}/bin/emacsclient -c"; + icon = "emacs"; + comment = "More than just a text editor"; + genericName = "Text Editor"; + mimeType = [ + "text/english" + "text/plain" + "text/x-makefile" + "text/x-c++hdr" + "text/x-c++src" + "text/x-chdr" + "text/x-csrc" + "text/x-java" + "text/x-moc" + "text/x-pascal" + "text/x-tcl" + "text/x-tex" + "application/x-shellscript" + "text/x-c" + "text/x-c++" + ]; + categories = [ "Development" "TextEditor" ]; + }; }