From 4c09acde735bc3615928d1a45b7900de3a4bee2d Mon Sep 17 00:00:00 2001 From: Tyler Beckman Date: Mon, 23 Dec 2024 00:46:07 -0700 Subject: [PATCH] Disable zsh history file --- home-manager/config/shell/zsh.nix | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/home-manager/config/shell/zsh.nix b/home-manager/config/shell/zsh.nix index e4f1114..b3c5c8b 100644 --- a/home-manager/config/shell/zsh.nix +++ b/home-manager/config/shell/zsh.nix @@ -3,7 +3,7 @@ # Zsh itself programs.zsh = { enable = true; - + autosuggestion = { enable = true; strategy = [ "completion" ]; @@ -24,8 +24,19 @@ bindkey "^H" backward-kill-word bindkey "^Z" undo ''; + + # Disable saving the history file, as it is handled by atuin + history = { + # Tell it to not save anything to disk + save = 0; + # If it still tries to save anything, have it write to /dev/null instead just in case + path = "/dev/null"; + # We leave size at the default to allow zsh to have command history in memory + # for features like !! or !cmdname, but simply have it stop writing to disk + size = 10000; + }; }; - + # Atuin shell history programs.atuin = { enable = true; @@ -45,7 +56,7 @@ store_failed = true; secrets_filter = true; enter_accept = false; - + stats = { common_prefix = [ "sudo" "doas" ]; }; @@ -56,4 +67,4 @@ }; }; }; -} \ No newline at end of file +}