dotfiles/nix/nushell-plugins.nix

23 lines
675 B
Nix

{ config, lib, pkgs, ... }:
{
options.nushell-plugins = lib.mkOption { };
config.nushell-plugins = {
jobcontrol = (builtins.getFlake
"git+https://git.mzte.de/LordMZTE/nu-plugin-jobcontrol.git?rev=3a02910ff138691ecf3557722411e53261d900d4"
).outputs.packages.${pkgs.system}.default;
inherit (pkgs.nushellPlugins) polars formats query dbus;
};
config.output.packages.nushell-plugins = pkgs.writeTextFile {
name = "add-plugins.nu";
text = builtins.concatStringsSep "\n"
(lib.mapAttrsToList
(name: d:
''
plugin add ${lib.getBin d}/bin/nu_plugin_${name}
'')
config.nushell-plugins);
};
}