From 0b8ff9f5194c23c7603eb29ec4b55ea26d7f8f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madeleine=20Sydney=20=C5=9Alaga?= Date: Sun, 23 Nov 2025 07:30:27 -0700 Subject: [PATCH] feat(emacs): default editor --- modules/home/emacs.nix | 14 ++++++++++++++ modules/home/users/msyds/emacs.nix | 1 + 2 files changed, 15 insertions(+) diff --git a/modules/home/emacs.nix b/modules/home/emacs.nix index e678b2d..dcd259e 100644 --- a/modules/home/emacs.nix +++ b/modules/home/emacs.nix @@ -4,6 +4,13 @@ let cfg = config.sydnix.emacs; in { options.sydnix.emacs = { enable = lib.mkEnableOption "Emacs"; + defaultEditor = lib.mkOption { + description = '' + Set as default editor? + ''; + default = false; + type = lib.types.bool; + }; userDir = lib.mkOption { description = '' The path to the Emacs user directory. @@ -121,6 +128,13 @@ in { version = cfg.package.version; }; in { + + # Set emacsclient as the default editor for the time being. + home.sessionVariables = { + EDITOR = "emacsclient"; + VISUAL = "emacsclient"; + }; + programs.emacs = { enable = true; package = sydmacs; diff --git a/modules/home/users/msyds/emacs.nix b/modules/home/users/msyds/emacs.nix index 9286237..0afe85f 100755 --- a/modules/home/users/msyds/emacs.nix +++ b/modules/home/users/msyds/emacs.nix @@ -33,6 +33,7 @@ in { sydnix.emacs = { enable = true; + defaultEditor = true; inherit (cfg) userDir; fontPackages = [ pkgs.julia-mono