From baae94abb6a9a03914216f0f373b7b0f6b0207bd Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Sat, 19 Sep 2026 01:40:50 +0530 Subject: chore: removed all raw string configurations options in favor of files Moved all configurations which were previously raw strings chunks, for options that the home-manager options didn't provide, into files for that specific configuration and reading there contents instead (with string replacement for passing information from the rest of the configuration). --- modules/terminal/zsh/default.nix | 19 +++---------------- modules/terminal/zsh/init.sh | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 modules/terminal/zsh/init.sh (limited to 'modules/terminal/zsh') diff --git a/modules/terminal/zsh/default.nix b/modules/terminal/zsh/default.nix index 0f0471c..8b7897c 100644 --- a/modules/terminal/zsh/default.nix +++ b/modules/terminal/zsh/default.nix @@ -25,22 +25,9 @@ dotDir = "${config.xdg.configHome}/zsh"; history.path = "${config.xdg.cacheHome}/zsh/history"; enableCompletion = true; - initContent = '' - setopt PROMPT_SUBST - - # Vi insert/command modes for command-line editing. Escape enters normal mode. - bindkey -v - KEYTIMEOUT=1 - - autoload -U colors && colors - - export GPG_TTY="$(tty)" - gpg-connect-agent updatestartuptty /bye >/dev/null 2>&1 - - bindkey "^[[3~" delete-char - bindkey "^?" backward-delete-char - ${nixCommandWrappers} - ''; + initContent = builtins.replaceStrings [ "@@NIX_COMMAND_WRAPPERS@@" ] [ nixCommandWrappers ] ( + builtins.readFile ./init.sh + ); }; home.sessionVariables.SHELL = "${lib.getExe config.terminal.zsh.package}"; diff --git a/modules/terminal/zsh/init.sh b/modules/terminal/zsh/init.sh new file mode 100644 index 0000000..b44895c --- /dev/null +++ b/modules/terminal/zsh/init.sh @@ -0,0 +1,14 @@ +setopt PROMPT_SUBST + +# Vi insert/command modes for command-line editing. Escape enters normal mode. +bindkey -v +KEYTIMEOUT=1 + +autoload -U colors && colors + +export GPG_TTY="$(tty)" +gpg-connect-agent updatestartuptty /bye >/dev/null 2>&1 + +bindkey "^[[3~" delete-char +bindkey "^?" backward-delete-char +@@NIX_COMMAND_WRAPPERS@@ -- cgit v1.2.3