Compare commits

...

2 commits

Author SHA1 Message Date
a1be7f14fa
nushell-plugins: remove redundant plugin removals 2024-07-22 18:12:31 +02:00
afc039c907
indentation fix in nu config 2024-07-22 17:14:34 +02:00
2 changed files with 12 additions and 17 deletions

View file

@ -1,6 +1,6 @@
<! function gitalias(new, old) !>
def --wrapped "git <% new %>" [...rest] {
git <% old %> ...$rest
git <% old %> ...$rest
}
<! end !>

View file

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
let
nu-ver = "0.95.0";
in
in
{
options.nushell-plugins = lib.mkOption { };
@ -57,19 +57,14 @@ in
})
];
config.output.packages.nushell-plugins =
let
pluginName = d: lib.removePrefix "nu-plugin-" d.name;
in
pkgs.writeTextFile {
name = "add-plugins.nu";
text = builtins.concatStringsSep "\n"
(map
(d:
''
if (plugin list | any { |p| $p.name == "${pluginName d}" }) { plugin rm ${pluginName d} }
plugin add ${lib.getBin d}/bin/${builtins.replaceStrings ["-"] ["_"] d.name}
'')
config.nushell-plugins);
};
config.output.packages.nushell-plugins = pkgs.writeTextFile {
name = "add-plugins.nu";
text = builtins.concatStringsSep "\n"
(map
(d:
''
plugin add ${lib.getBin d}/bin/${builtins.replaceStrings ["-"] ["_"] d.name}
'')
config.nushell-plugins);
};
}