diff --git a/modules/targets/generic-linux.nix b/modules/targets/generic-linux.nix index b76808852..9132d8898 100644 --- a/modules/targets/generic-linux.nix +++ b/modules/targets/generic-linux.nix @@ -57,6 +57,24 @@ in { . "${profileDirectory}/etc/profile.d/hm-session-vars.sh" ''; + programs.zsh.envExtra = '' + # Make system functions available to zsh + () { + setopt LOCAL_OPTIONS CASE_GLOB EXTENDED_GLOB + + local system_fpaths=( + # Package default + /usr/share/zsh/site-functions(/-N) + + # Debian + /usr/share/zsh/functions/**/*(/-N) + /usr/share/zsh/vendor-completions/(/-N) + /usr/share/zsh/vendor-functions/(/-N) + ) + fpath=(''${fpath} ''${system_fpaths}) + } + ''; + systemd.user.sessionVariables = let # https://github.com/archlinux/svntogit-packages/blob/packages/ncurses/trunk/PKGBUILD # https://salsa.debian.org/debian/ncurses/-/blob/master/debian/rules