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