From 6a11ce76229a701292335399b76aa6186697e139 Mon Sep 17 00:00:00 2001 From: Bo Jeanes Date: Wed, 17 Jul 2024 14:22:12 +1000 Subject: [PATCH] Add `atuin` for shell history --- flake.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/flake.nix b/flake.nix index 36eaea9..0dc9db5 100644 --- a/flake.nix +++ b/flake.nix @@ -276,6 +276,8 @@ ]; }; + # By default, this integration also hooks into shell ^R for history search, but atuin is better + # and fortunately appears to take precedence when both are enabled programs.fzf.enable = true; programs.fzf.enableZshIntegration = true; programs.fzf.enableBashIntegration = true; @@ -283,6 +285,26 @@ "--preview '${pkgs.bat}/bin/bat --color=always --style=numbers --line-range :500 {}'" ]; + + # Shell history recording + UI + programs.atuin.enable = true; + programs.atuin.enableZshIntegration = true; + programs.atuin.enableBashIntegration = true; + programs.atuin.settings = { + dialect = "uk"; + filter_mode_shell_up_key_binding = "session"; + workspaces = true; + style = "compact"; + inline_height = 20; + enter_accept = false; + ctrl_n_shortcuts = true; + + stats.common_prefix = [ + "sudo" + "time" + ]; + }; + home.packages = with pkgs; [ asdf ];