Commit 4bef2be1dd7c
Changed files (1)
home
common
dev
home/common/dev/emacs.nix
@@ -1,6 +1,7 @@
{
config,
pkgs,
+ desktop ? null,
...
}:
let
@@ -192,14 +193,16 @@ in
];
programs.emacs = {
enable = true;
- # FIXME: choose depending on the enabled modules
- #package = (pkgs.emacs29.override { withTreeSitter = true; withNativeCompilation = true; withPgtk = true; withWebP = true; withGTK3 = true; withSQLite3 = true; });
+ # Build Emacs with GUI support (GTK3/PGTK/X11) only on desktop systems
+ # On servers, use terminal-only build to avoid D-Bus dependency
package = pkgs.emacs-unstable.override {
withTreeSitter = true;
withNativeCompilation = true;
- withPgtk = true;
- withWebP = true;
- withGTK3 = true;
+ # Only enable GUI features when desktop is configured
+ withX = desktop != null;
+ withPgtk = desktop != null;
+ withWebP = desktop != null;
+ withGTK3 = desktop != null;
withSQLite3 = true;
};
extraPackages = myExtraPackages;