diff --git a/users/modules/emacs.nix b/users/modules/emacs.nix index 741da44..b9cfcbf 100644 --- a/users/modules/emacs.nix +++ b/users/modules/emacs.nix @@ -7,7 +7,6 @@ with lib; let emacsDefaultPackage = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages ( epkgs: [ - epkgs.vterm epkgs.mu4e epkgs.pdf-tools ] diff --git a/users/modules/hyprland.nix b/users/modules/hyprland.nix index 7011041..abc61c4 100644 --- a/users/modules/hyprland.nix +++ b/users/modules/hyprland.nix @@ -121,7 +121,7 @@ in { $down = t $menu = ${pkgs.wofi}/bin/wofi --show drun - bind = SUPER, Return, exec, kitty + bind = SUPER, Return, exec, ${pkgs.kitty}/bin/kitty ${pkgs.tmux}/bin/tmux bind = SUPER, Space, submap, leader bind = , Print, submap, screenshot diff --git a/users/modules/shell/bash.nix b/users/modules/shell/bash.nix index 241ec8e..f53b7ba 100644 --- a/users/modules/shell/bash.nix +++ b/users/modules/shell/bash.nix @@ -7,8 +7,8 @@ with lib; let cfg = config.modules.bash; in { options.modules.bash = { - enable = lib.mkEnableOption "enables bash"; - aliases = lib.mkOption { + enable = mkEnableOption "Enables bash"; + aliases = mkOption { type = types.attrsOf types.str; default = {}; example = { @@ -16,16 +16,23 @@ in { lns = "ln -si"; }; }; - bashrcExtra = lib.mkOption { + eatIntegration = mkEnableOption "Enable Emacs Eat integration"; + bashrcExtra = mkOption { type = types.lines; default = ""; }; }; - config = lib.mkIf cfg.enable { + config = mkIf cfg.enable { programs.bash = { enable = true; - inherit (cfg) bashrcExtra; + # inherit (cfg) bashrcExtra; + bashrcExtra = + concatLines + [ + (strings.optionalString cfg.eatIntegration ''[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/bash"'') + cfg.bashrcExtra + ]; shellAliases = cfg.aliases; shellOptions = [ "histappend" diff --git a/users/modules/shell/default.nix b/users/modules/shell/default.nix index a97c931..951a46e 100644 --- a/users/modules/shell/default.nix +++ b/users/modules/shell/default.nix @@ -72,7 +72,7 @@ in { ]; options.modules.shell = { - tmux.enable = mkEnableOption "Enables tmux"; + eatIntegration = mkEnableOption "Enable Emacs Eat integration in Bash or Zsh"; enableBash = mkOption { type = types.bool; default = true; @@ -92,6 +92,7 @@ in { enable = mkEnableOption "Enables the starship prompt."; jjIntegration = mkEnableOption "Enables Jujutsu integration in starship."; }; + tmux.enable = mkEnableOption "Enables tmux"; zoxide = { enable = mkOption { type = types.bool; diff --git a/users/modules/shell/zsh.nix b/users/modules/shell/zsh.nix index 0fd6021..ac452fd 100644 --- a/users/modules/shell/zsh.nix +++ b/users/modules/shell/zsh.nix @@ -17,6 +17,7 @@ in { lns = "ln -si"; }; }; + eatIntegration = mkEnableOption "Enable Emacs Eat integration"; zshrcExtra = lib.mkOption { type = types.lines; default = ""; @@ -53,6 +54,7 @@ in { zstyle ':completion:*' menu no zstyle ':fzf-tab:complete:cd:*' fzf-preview '${pkgs.eza}/bin/eza $realpath' '' + (strings.optionalString cfg.eatIntegration ''[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/zsh"'') cfg.zshrcExtra ]; oh-my-zsh = { diff --git a/users/phundrak/home.nix b/users/phundrak/home.nix index 586050b..bc8c793 100644 --- a/users/phundrak/home.nix +++ b/users/phundrak/home.nix @@ -24,7 +24,6 @@ config = let emacsPkg = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages ( epkgs: [ - epkgs.vterm epkgs.mu4e epkgs.pdf-tools ] @@ -49,7 +48,10 @@ }; modules = { - shell.starship.jjIntegration = true; + shell = { + eatIntegration = true; + starship.jjIntegration = true; + }; bat.extras = true; packages.emacsPackage = emacsPkg; mopidy.enable = true;