diff --git a/modules/lib/zsh.nix b/modules/lib/zsh.nix index d008ca475..26f0133d6 100644 --- a/modules/lib/zsh.nix +++ b/modules/lib/zsh.nix @@ -30,5 +30,13 @@ rec { # Given an attribute set containing shell variable names and their # assignments, this function produces a string containing an export # statement for each set entry. - exportAll = vars: lib.concatStringsSep "\n" (lib.mapAttrsToList export vars); + exportAll = + vars: + { + indent ? "", + }: + let + separator = if indent == "" then "\n" else "\n" + indent; + in + lib.concatStringsSep separator (lib.mapAttrsToList export vars); }