diff --git a/home-manager/modules/nushell/config.nu b/home-manager/modules/nushell/config.nu index 161a368..9be4915 100644 --- a/home-manager/modules/nushell/config.nu +++ b/home-manager/modules/nushell/config.nu @@ -453,4 +453,4 @@ let-env config = { ] } ] -} +} \ No newline at end of file diff --git a/home-manager/modules/nushell/default.nix b/home-manager/modules/nushell/default.nix index 0f8c60a..da0aa8c 100644 --- a/home-manager/modules/nushell/default.nix +++ b/home-manager/modules/nushell/default.nix @@ -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 + ]; }; } diff --git a/home-manager/modules/nushell/env.nu b/home-manager/modules/nushell/env.nu index 195f698..69228ef 100644 --- a/home-manager/modules/nushell/env.nu +++ b/home-manager/modules/nushell/env.nu @@ -26,14 +26,14 @@ let-env ENV_CONVERSIONS = { # # By default, /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, /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: diff --git a/home-manager/modules/nushell/plugin-formats.nix b/home-manager/modules/nushell/plugin-formats.nix new file mode 100644 index 0000000..4bfc682 --- /dev/null +++ b/home-manager/modules/nushell/plugin-formats.nix @@ -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; + }; +} diff --git a/machines/mimir/configuration.nix b/machines/mimir/configuration.nix index c2d4d06..62ada02 100644 --- a/machines/mimir/configuration.nix +++ b/machines/mimir/configuration.nix @@ -184,6 +184,8 @@ services.cpupower-gui.enable = true; services.flatpak.enable = true; + services.tailscale.enable = true; + services.xserver.libinput = { enable = true; mouse = { diff --git a/users/erwin/work.nix b/users/erwin/work.nix index aa5218b..a4f0974 100644 --- a/users/erwin/work.nix +++ b/users/erwin/work.nix @@ -115,7 +115,6 @@ in minio-client mpv nordzy-cursor-theme - nushell pamedia pass quintom-cursor-theme