From 9965ccccfdb5345af3ae73b479365949ebcc526d Mon Sep 17 00:00:00 2001 From: Tim McCarthy Date: Mon, 15 Apr 2024 09:30:19 -0700 Subject: [PATCH] Swap home.nix to thoom-emacs config --- nix/home.nix | 1 + nix/modules/dotfiles.nix | 2 +- nix/modules/emacs.nix | 10 +++++++--- nix/modules/fish/default.nix | 6 +++--- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/nix/home.nix b/nix/home.nix index bcb34a6..6bbe709 100644 --- a/nix/home.nix +++ b/nix/home.nix @@ -31,6 +31,7 @@ roboto-mono ]; macPackages = basePackages ++ [ + # Emacs on Mac wants prefixed versions of GNU coreutils coreutils-prefixed ]; in diff --git a/nix/modules/dotfiles.nix b/nix/modules/dotfiles.nix index 8385453..dc53360 100644 --- a/nix/modules/dotfiles.nix +++ b/nix/modules/dotfiles.nix @@ -9,6 +9,6 @@ in "tmux/tmux.conf".source = ../../tmux.conf; "vim/vimrc".source = ../../vimrc; "ideavim/ideavimrc".source = ../../ideavimrc; - "doom".source = mkOutOfStoreSymlink "${dotdir}/doom"; + # "doom".source = mkOutOfStoreSymlink "${dotdir}/doom"; }; } diff --git a/nix/modules/emacs.nix b/nix/modules/emacs.nix index 51a2dce..a712d53 100644 --- a/nix/modules/emacs.nix +++ b/nix/modules/emacs.nix @@ -1,14 +1,18 @@ { config, lib, pkgs, ... }: +with config.lib.file; +let dotdir = "${config.home.homeDirectory}/.dotfiles"; +in { programs.emacs.enable = true; programs.emacs.package = pkgs.emacs; programs.emacs.extraPackages = epkgs: [ epkgs.vterm ]; home.packages = with pkgs; [ - # Needed on macOS because Emacs wants the GNU version of some utilities like ls - coreutils # Required by nativeComp but not a dependency for some reason zstd - nodePackages.pyright ]; + + xdg.configFile = { + "emacs".source = mkOutOfStoreSymlink "${dotdir}/thoom-emacs"; + }; } diff --git a/nix/modules/fish/default.nix b/nix/modules/fish/default.nix index 2ff106d..a92fd2d 100644 --- a/nix/modules/fish/default.nix +++ b/nix/modules/fish/default.nix @@ -54,12 +54,12 @@ let tide_conf = builtins.readFile ./tide_config.fish; in fish_add_path --path ~/.dotfiles/bin ~/.local/bin ~/bin - # TODO - Adjust for nix-managed Doom if I ever do that - fish_add_path ~/.emacs.d/bin + # fish_add_path ~/.emacs.d/bin fzf_configure_bindings --history=\cr --directory=\ef --git_status=\es - # + # If running under kitty, fake the term for ssh to avoid + # having to install terminfo on remote machine function ssh --wraps ssh if test $TERM = xterm-kitty set --function --export TERM xterm-256color