diff --git a/modules/programs/keychain.nix b/modules/programs/keychain.nix index d59855f5..4aeef413 100644 --- a/modules/programs/keychain.nix +++ b/modules/programs/keychain.nix @@ -117,7 +117,10 @@ in { eval "$(SHELL=zsh ${shellCommand})" ''; programs.nushell.extraConfig = mkIf cfg.enableNushellIntegration '' - ${shellCommand} | parse -r '(\w+)=(.*); export \1' | transpose -ird | load-env + let keychain_shell_command = (SHELL=bash ${shellCommand}| parse -r '(\w+)=(.*); export \1' | transpose -ird) + if not ($keychain_shell_command|is-empty) { + $keychain_shell_command | load-env + } ''; xsession.initExtra = mkIf cfg.enableXsessionIntegration '' eval "$(SHELL=bash ${shellCommand})"