From 8305d2a247b9e304e6ec59d9a90d7ce64c04d8c5 Mon Sep 17 00:00:00 2001 From: willemml Date: Wed, 15 Nov 2023 22:45:09 -0800 Subject: [PATCH] Switches emacs on macos to cli --- flake.lock | 82 ++------------------------------- flake.nix | 3 -- flake/overlays.nix | 1 - home/darwin/launchd.nix | 5 ++ home/programs/kitty/default.nix | 4 +- home/programs/zsh.nix | 2 - 6 files changed, 13 insertions(+), 84 deletions(-) diff --git a/flake.lock b/flake.lock index 1dbf4b2..fd58a88 100644 --- a/flake.lock +++ b/flake.lock @@ -21,28 +21,6 @@ "type": "github" } }, - "emacs-overlay": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1699724244, - "narHash": "sha256-I3+cOlXU4jIoqnyYWezbNc26/56EI4YwwDQf80hdbeI=", - "owner": "nix-community", - "repo": "emacs-overlay", - "rev": "c5f0c468f8e92246473c1eabe997ad1c41fb6a1a", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "emacs-overlay", - "type": "github" - } - }, "fenix": { "inputs": { "nixpkgs": "nixpkgs", @@ -113,25 +91,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { "lastModified": 1685518550, @@ -193,7 +153,7 @@ "inputs": { "hyprland-protocols": "hyprland-protocols", "nixpkgs": "nixpkgs_2", - "systems": "systems_2", + "systems": "systems", "wlroots": "wlroots", "xdph": "xdph" }, @@ -333,22 +293,6 @@ } }, "nixpkgs-stable": { - "locked": { - "lastModified": 1699291058, - "narHash": "sha256-5ggduoaAMPHUy4riL+OrlAZE14Kh7JWX4oLEs22ZqfU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "41de143fda10e33be0f47eab2bfe08a50f234267", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_2": { "locked": { "lastModified": 1685801374, "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=", @@ -399,12 +343,12 @@ "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "gitignore": "gitignore", "nixpkgs": [ "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable_2" + "nixpkgs-stable": "nixpkgs-stable" }, "locked": { "lastModified": 1699271226, @@ -423,7 +367,6 @@ "root": { "inputs": { "darwin": "darwin", - "emacs-overlay": "emacs-overlay", "fenix": "fenix", "flake-parts": "flake-parts", "home-manager": "home-manager", @@ -469,21 +412,6 @@ } }, "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -498,7 +426,7 @@ "type": "github" } }, - "systems_3": { + "systems_2": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", diff --git a/flake.nix b/flake.nix index 8a7547a..4496c10 100644 --- a/flake.nix +++ b/flake.nix @@ -7,9 +7,6 @@ darwin.url = "github:willemml/nix-darwin?ref=feat/networking.hosts"; darwin.inputs.nixpkgs.follows = "nixpkgs"; - emacs-overlay.url = "github:nix-community/emacs-overlay"; - emacs-overlay.inputs.nixpkgs.follows = "nixpkgs"; - fenix.url = "github:nix-community/fenix"; flake-parts.url = "github:hercules-ci/flake-parts"; diff --git a/flake/overlays.nix b/flake/overlays.nix index c236090..383f323 100644 --- a/flake/overlays.nix +++ b/flake/overlays.nix @@ -6,7 +6,6 @@ }: { flake.overlays = { default = import ../packages; - emacs-overlay = inputs.emacs-overlay.overlays.default; fenix = inputs.fenix.overlays.default; }; } diff --git a/home/darwin/launchd.nix b/home/darwin/launchd.nix index 3a019d9..f0bc3c6 100644 --- a/home/darwin/launchd.nix +++ b/home/darwin/launchd.nix @@ -12,6 +12,11 @@ in { agents.emacs = { enable = true; config = { + EnvironmentVariables = { + TERM = "xterm-kitty"; + TERMINFO = "${config.programs.kitty.package}/Applications/kitty.app/Contents/Resources/kitty/terminfo"; + TERMINFO_DIRS = "${config.home.homeDirectory}/.nix-profile/share/terminfo:/run/current-system/sw/share/terminfo:/nix/var/nix/profiles/default/share/terminfo:/usr/share/terminfo"; + }; ProgramArguments = [ "${config.programs.emacs.finalPackage}/bin/emacs" "--fg-daemon" diff --git a/home/programs/kitty/default.nix b/home/programs/kitty/default.nix index b74203a..54fc278 100644 --- a/home/programs/kitty/default.nix +++ b/home/programs/kitty/default.nix @@ -8,7 +8,9 @@ enable = true; extraConfig = '' include themes/draculaplus.conf - editor "${config.programs.emacs.finalPackage.out}/bin/emacsclient" -c + editor "${config.programs.emacs.finalPackage.out}/bin/emacsclient" -nw -c + + macos_option_as_alt yes ''; shellIntegration.enableZshIntegration = true; diff --git a/home/programs/zsh.nix b/home/programs/zsh.nix index 9ad6b46..570aaea 100644 --- a/home/programs/zsh.nix +++ b/home/programs/zsh.nix @@ -83,8 +83,6 @@ dotd = "cd ${config.home.sessionVariables.DOTDIR} "; e = "emacsclient -c -nw"; em = "emacs -nw"; - emw = "emacs"; - ew = "emacsclient -c -n"; l = "ls -1"; lh = "ls --hyperlink"; np = "nix-shell -p";