aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-18 19:35:54 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-18 19:35:54 +0200
commit1721486119b02d8fa27b7c30f747f8d247f8d021 (patch)
treead9d0587c378dcf115d298dcc028d76e43ee4bcc
parentfeat(hosts): Share common options (diff)
downloadnixos-config-1721486119b02d8fa27b7c30f747f8d247f8d021.zip
refactor(modules/legacy/conf/zsh): Modernize module
-rw-r--r--modules/home.legacy/conf/zsh/default.nix12
1 files changed, 5 insertions, 7 deletions
diff --git a/modules/home.legacy/conf/zsh/default.nix b/modules/home.legacy/conf/zsh/default.nix
index cb1a565f..2af7cdbe 100644
--- a/modules/home.legacy/conf/zsh/default.nix
+++ b/modules/home.legacy/conf/zsh/default.nix
@@ -6,10 +6,6 @@
system,
...
}: {
- # TODO: ADD THIS ADDON
- # next one only works if your alias is only a command, e.g. if you `alias='cat some_file.txt &2> /dev/null'`, running `cat some_file.txt` won't trigger it.
- # TODO: find something better for this use case
- # zsh-you-should-use # ZSH plugin that reminds you to use existing aliases for commands you just typed
home.sessionPath = [];
programs.zsh = {
enable = true;
@@ -19,13 +15,15 @@
autocd = true;
+ # Must be relative to the users home directory (for whatever reason)
+ # Thus no `${config.xdg.configHome}`
dotDir = ".config/zsh";
history = {
extended = true;
ignoreDups = false;
expireDuplicatesFirst = false;
- ignoreSpace = false; # TODO: I might change that
+ ignoreSpace = false;
path = "${config.xdg.dataHome}/zsh/history";
save = 9000000; # number of lines to save
@@ -39,9 +37,9 @@
};
loginExtra =
- ""
+ "setopt " # The extra space is important
+ lib.concatStringsSep "\nsetopt " [
- "setopt AUTO_CD" # This is needed as first item
+ "AUTO_CD"
"AUTO_PUSHD"
"CHASE_DOTS"