mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
keychain: add nushell integration
This commit is contained in:
@@ -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})"
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user