nix-index: add nushell integration (#8211)
https://github.com/nix-community/nix-index?tab=readme-ov-file#usage-as-a-command-not-found-replacement
This commit is contained in:
parent
381f4f8a3a
commit
295d90e22d
3 changed files with 25 additions and 0 deletions
|
|
@ -23,6 +23,8 @@ in
|
|||
enableFishIntegration = lib.hm.shell.mkFishIntegrationOption { inherit config; };
|
||||
|
||||
enableZshIntegration = lib.hm.shell.mkZshIntegrationOption { inherit config; };
|
||||
|
||||
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption { inherit config; };
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
@ -65,5 +67,9 @@ in
|
|||
${wrapper} $argv
|
||||
end
|
||||
'';
|
||||
|
||||
programs.nushell.settings.hooks.command_not_found = lib.mkIf cfg.enableNushellIntegration (
|
||||
lib.hm.nushell.mkNushellInline "source ${cfg.package}/etc/profile.d/command-not-found.nu"
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue