From 74fd4e758ad3fd8e1faade537b778ad8069bb684 Mon Sep 17 00:00:00 2001 From: Steffen Illium Date: Tue, 13 Jan 2026 21:56:41 +0100 Subject: [PATCH] correceted zsh imports --- configuration.nix | 1 + program-homemanager.nix | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/configuration.nix b/configuration.nix index 43f0ad6..e4b13f4 100644 --- a/configuration.nix +++ b/configuration.nix @@ -114,6 +114,7 @@ zoxide yazi fzf + zip ]; # Firewall settings diff --git a/program-homemanager.nix b/program-homemanager.nix index 24db201..98b6472 100644 --- a/program-homemanager.nix +++ b/program-homemanager.nix @@ -22,7 +22,27 @@ in programs.fzf.enableZshIntegration = true; programs.zoxide.enable = true; programs.zoxide.enableZshIntegration = true; - programs.zsh.envExtra = ["LANG=en_US.UTF-8" "EDITOR='nano'"]; + programs.zsh = { + enable = true; + initContent = '' + zipdirs() { + for f in ./*; do + if [ -d "$f" ]; then + find "$f" -type f -name "*.txt" -delete + if [ -n "$(find "$f" -mindepth 1 -type d -print -quit)" ]; then + echo "Skipping $f: contains sub-folders" + continue + fi + zip -0 -r -j "$f.zip" "$f"/* && rm -rf "$f" + fi + done + } + ''; + envExtra = '' + export LANG=en_US.UTF-8 + export EDITOR='nano' + ''; + }; }; home-manager.users."${config.vars.username}" = { @@ -41,7 +61,6 @@ in programs.fzf.enableZshIntegration = true; programs.zoxide.enable = true; programs.zoxide.enableZshIntegration = true; - programs.zsh.envExtra = ["LANG=en_US.UTF-8" "EDITOR='nano'"]; programs.ssh = { enable = true; addKeysToAgent = "yes";