From da72e6fc6b7dc0c3f94edbd310aae7cd95c678b5 Mon Sep 17 00:00:00 2001 From: Kiran Ostrolenk Date: Mon, 13 Feb 2023 18:49:31 +0000 Subject: [PATCH] keychain: add nushell integration --- modules/programs/keychain.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/programs/keychain.nix b/modules/programs/keychain.nix index 419c116a..61ab4823 100644 --- a/modules/programs/keychain.nix +++ b/modules/programs/keychain.nix @@ -87,6 +87,14 @@ in { ''; }; + enableNushellIntegration = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable Nushell integration. + ''; + }; + enableXsessionIntegration = mkOption { default = true; type = types.bool; @@ -108,6 +116,9 @@ in { programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' eval "$(SHELL=zsh ${shellCommand})" ''; + programs.nushell.extraConfig = mkIf cfg.enableNushellIntegration '' + ${shellCommand} | parse -r '(\w+)=(.*); export \1' | transpose -ird | load-env + ''; xsession.initExtra = mkIf cfg.enableXsessionIntegration '' eval "$(${shellCommand})" '';