From 5a19666431290e5f24c6ead0fcdad0c952a54251 Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Wed, 17 Aug 2022 11:29:24 +0200 Subject: [PATCH] zsh history adheres to XDG specs --- home/nixos-common.nix | 1 + home/zsh/common.nix | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/home/nixos-common.nix b/home/nixos-common.nix index 7b11dea..dc08bbd 100644 --- a/home/nixos-common.nix +++ b/home/nixos-common.nix @@ -91,6 +91,7 @@ ".local/share/mpd" ".local/share/webkitgtk" ".local/state/wireplumber" + ".local/state/zsh" ".mozilla" ".newsboat" ".password-store" diff --git a/home/zsh/common.nix b/home/zsh/common.nix index a351655..e17cbff 100644 --- a/home/zsh/common.nix +++ b/home/zsh/common.nix @@ -1,6 +1,7 @@ { config, pkgs, ... }: -{ +let xdg-state-home = "${config.home.homeDirectory}/.local/state"; +in { programs.starship = { enable = true; enableZshIntegration = true; @@ -54,6 +55,7 @@ ignoreDups = true; ignoreSpace = true; share = false; + path = "${xdg-state-home}/zsh/history"; }; shellAliases = { testpl = ''echo "\ue0b0 \u00b1 \ue0a0 \u27a6 \u2718 \u26a1 \u2699"'';