aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name/zs
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name/zs')
-rw-r--r--modules/by-name/zs/zsh/module.nix21
1 files changed, 11 insertions, 10 deletions
diff --git a/modules/by-name/zs/zsh/module.nix b/modules/by-name/zs/zsh/module.nix
index fd99031b..72e49737 100644
--- a/modules/by-name/zs/zsh/module.nix
+++ b/modules/by-name/zs/zsh/module.nix
@@ -13,7 +13,10 @@
sourceFile = path: "source ${path}\n";
extraFiles = builtins.concatStringsSep "\n" (
- builtins.map sourceFile (
+ builtins.map (value:
+ if builtins.isPath value
+ then (sourceFile value)
+ else value) (
builtins.attrValues cfg.integrations
)
);
@@ -22,7 +25,7 @@ in {
enable = lib.mkEnableOption "zsh";
integrations = lib.mkOption {
- type = lib.types.attrsOf lib.types.path;
+ type = lib.types.attrsOf (lib.types.either lib.types.path lib.types.str);
example = ''
{
atuin = ./integrations/atuin.zsh;
@@ -92,16 +95,11 @@ in {
setopt VI
'';
- initExtraFirst =
- sourceFile ./config/zsh-init.zsh
- + ''
- SHELL_LIBRARY_VERSION="2.1.2" source ${shell_library.rawLib.${system}}
- '';
-
- initExtra = let
+ initContent = let
start = lib.modules.mkBefore (
# NOTE: This must be before the insult, as we otherwise override the previous handler <2024-02-28>
- sourceFile ./config/command_not_found/command_not_found.sh
+ sourceFile ./config/zsh-init.zsh
+ + sourceFile ./config/command_not_found/command_not_found.sh
+ sourceFile ./config/command_not_found/command_not_found_insult.sh
+ sourceFile ./config/custom_cursor.zsh
+ sourceFile ./config/edit_command_line.zsh
@@ -117,6 +115,9 @@ in {
+ sourceFile ./config/keymaps/viopp.zsh
+ sourceFile ./config/keymaps/visual.zsh
+ sourceFile ./config/keymaps_end.zsh
+ + ''
+ SHELL_LIBRARY_VERSION="2.1.2" source ${shell_library.rawLib.${system}}
+ ''
);
in
lib.modules.mkMerge