feat(emacs): default editor

This commit is contained in:
2025-11-23 07:30:27 -07:00
parent afc7ae57b0
commit 0b8ff9f519
2 changed files with 15 additions and 0 deletions

View File

@@ -4,6 +4,13 @@ let cfg = config.sydnix.emacs;
in { in {
options.sydnix.emacs = { options.sydnix.emacs = {
enable = lib.mkEnableOption "Emacs"; enable = lib.mkEnableOption "Emacs";
defaultEditor = lib.mkOption {
description = ''
Set as default editor?
'';
default = false;
type = lib.types.bool;
};
userDir = lib.mkOption { userDir = lib.mkOption {
description = '' description = ''
The path to the Emacs user directory. The path to the Emacs user directory.
@@ -121,6 +128,13 @@ in {
version = cfg.package.version; version = cfg.package.version;
}; };
in { in {
# Set emacsclient as the default editor for the time being.
home.sessionVariables = {
EDITOR = "emacsclient";
VISUAL = "emacsclient";
};
programs.emacs = { programs.emacs = {
enable = true; enable = true;
package = sydmacs; package = sydmacs;

View File

@@ -33,6 +33,7 @@ in {
sydnix.emacs = { sydnix.emacs = {
enable = true; enable = true;
defaultEditor = true;
inherit (cfg) userDir; inherit (cfg) userDir;
fontPackages = [ fontPackages = [
pkgs.julia-mono pkgs.julia-mono