extraPackages: wrap nushell

This commit is contained in:
Charlie Root 2024-09-12 09:37:27 +02:00
commit 0d08941285
3 changed files with 66 additions and 7 deletions

View file

@ -1,8 +1,9 @@
_: { {
imports = [ imports = [
./fmt.nix ./fmt.nix
./shell.nix ./shell.nix
./templates ./templates
./lib ./lib
./pkgs
]; ];
} }

View file

@ -8,7 +8,6 @@
pkgs, pkgs,
... ...
}: { }: {
# Attributes to add to overlays.default. # Attributes to add to overlays.default.
# The overlays.default overlay will re-evaluate perSystem with the “prev” (or “super”) overlay argument value # The overlays.default overlay will re-evaluate perSystem with the “prev” (or “super”) overlay argument value
# as the pkgs module argument. The easyOverlay module also adds the final module argument, for the result of applying the overlay. # as the pkgs module argument. The easyOverlay module also adds the final module argument, for the result of applying the overlay.
@ -17,12 +16,10 @@
# This requires Nixpkgs to be re-evaluated, which is more expensive than setting # This requires Nixpkgs to be re-evaluated, which is more expensive than setting
# pkgs to a Nixpkgs that already includes the necessary overlays that are required # pkgs to a Nixpkgs that already includes the necessary overlays that are required
# for the flake itself. # for the flake itself.
overlayAttrs = config.extraPackages; overlayAttrs = config.packages;
# https://noogle.dev/f/lib/filesystem/packagesFromDirectoryRecursive packages = {
extraPackages = lib.packagesFromDirectoryRecursive { nushell = import ./extraPackages/nushell-wrapped.nix {inherit inputs lib pkgs;};
inherit (pkgs) callPackage;
directory = ./extraPackages;
}; };
}; };
} }

View file

@ -0,0 +1,61 @@
{
inputs,
lib,
pkgs,
...
}: let
nushell-wrapped = inputs.wrapper-manager.lib.build {
inherit pkgs;
modules = [
{
wrappers.nushell-wrapped = {
basePackage = pkgs.nushell;
pathAdd = with pkgs; [
# better cd
zoxide
#better ls
eza
# better grep
ripgrep
# better dig
dogdns
# simply the best fetch tool out there
microfetch
fzf
iputils
gnumake
gping
asciinema
inetutils
scc
oefetch
wget
cpufetch
yt-dlp
tealdeer
glow
hyperfine
imagemagick
ffmpeg-full
catimg
nmap
wget
fd
jq
rsync
figlet
unzip
zip
];
};
}
];
};
in
nushell-wrapped