nushell: Add query and formats plugins, config tweak
This commit is contained in:
parent
b23ccd1515
commit
4abad48960
6 changed files with 51 additions and 5 deletions
|
@ -5,6 +5,12 @@ let
|
|||
|
||||
# TODO: Remove when starship is updated
|
||||
starshipCmd = "${config.home.profileDirectory}/bin/starship";
|
||||
|
||||
nushell_plugin_formats = pkgs.callPackage ./plugin-formats.nix {
|
||||
inherit (pkgs) stdenv lib rustPlatform;
|
||||
inherit (pkgs.darwin.apple_sdk_11_0.frameworks) IOKit CoreFoundation;
|
||||
nushell = config.programs.nushell.package;
|
||||
};
|
||||
in
|
||||
{
|
||||
options.eboskma.programs.nushell = { enable = mkEnableOption "nu shell"; };
|
||||
|
@ -12,6 +18,7 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
package = pkgs.nushell.override { additionalFeatures = p: p ++ [ "dataframe" ]; };
|
||||
configFile.source = ./config.nu;
|
||||
envFile.source = ./env.nu;
|
||||
|
||||
|
@ -30,6 +37,10 @@ in
|
|||
|
||||
};
|
||||
|
||||
home.packages = [ pkgs.carapace ];
|
||||
home.packages = with pkgs; [
|
||||
carapace
|
||||
nushellPlugins.query
|
||||
nushell_plugin_formats
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -26,14 +26,14 @@ let-env ENV_CONVERSIONS = {
|
|||
#
|
||||
# By default, <nushell-config-dir>/scripts is added
|
||||
let-env NU_LIB_DIRS = [
|
||||
($nu.config-path | path dirname | path join 'scripts')
|
||||
($env.HOME | path join '.config' 'nushell' 'scripts')
|
||||
]
|
||||
|
||||
# Directories to search for plugin binaries when calling register
|
||||
#
|
||||
# By default, <nushell-config-dir>/plugins is added
|
||||
let-env NU_PLUGIN_DIRS = [
|
||||
($nu.config-path | path dirname | path join 'plugins')
|
||||
($env.HOME | path join '.config' 'nushell' 'plugins')
|
||||
]
|
||||
|
||||
# To add entries to PATH (on Windows you might use Path), you can use the following pattern:
|
||||
|
|
34
home-manager/modules/nushell/plugin-formats.nix
Normal file
34
home-manager/modules/nushell/plugin-formats.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, rustPlatform
|
||||
, nushell
|
||||
, IOKit
|
||||
, CoreFoundation
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "nushell_plugin_formats";
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
inherit pname;
|
||||
version = nushell.version;
|
||||
|
||||
src = nushell.src;
|
||||
|
||||
cargoHash = "sha256-7cMUFCG6tL/Mj3An1+HA8Z7auBkJ/nvgPc/mm+t074E=";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ IOKit CoreFoundation ];
|
||||
|
||||
cargoBuildFlags = [ "--package nu_plugin_formats" ];
|
||||
|
||||
# compilation fails with a missing symbol
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Nushell plugin to convert various data formats";
|
||||
homepage = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_formats";
|
||||
license = licenses.mpl20;
|
||||
maintainers = [{ email = "erwin@datarift.nl"; github = "eboskma"; name = "Erwin Boskma"; githubId = 346752; }];
|
||||
platforms = with platforms; all;
|
||||
};
|
||||
}
|
|
@ -184,6 +184,8 @@
|
|||
services.cpupower-gui.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
|
||||
services.tailscale.enable = true;
|
||||
|
||||
services.xserver.libinput = {
|
||||
enable = true;
|
||||
mouse = {
|
||||
|
|
|
@ -115,7 +115,6 @@ in
|
|||
minio-client
|
||||
mpv
|
||||
nordzy-cursor-theme
|
||||
nushell
|
||||
pamedia
|
||||
pass
|
||||
quintom-cursor-theme
|
||||
|
|
Loading…
Reference in a new issue