{ pkgs, config, lib, ... }: with lib; let cfg = config.eboskma.programs.nushell; 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"; }; config = mkIf cfg.enable { programs.nushell = { enable = true; package = (pkgs.nushell.overrideAttrs (_oldAttrs: { doCheck = false; # Skip tests, because they take forever to build using emulation })).override { additionalFeatures = p: p ++ [ "dataframe" ]; }; configFile.source = ./config.nu; envFile.source = ./env.nu; extraEnv = '' let-env command_not_found_db = ${config.programs.command-not-found.dbPath} let-env NIX_SYSTEM = "${pkgs.system}" ''; extraConfig = '' alias vim = nvim alias tree = ${pkgs.exa}/bin/exa -Fb --git --tree let-env LS_COLORS = (${pkgs.vivid}/bin/vivid generate gruvbox-dark | str trim) register ${pkgs.nushellPlugins.query}/bin/nu_plugin_query register ${nushell_plugin_formats}/bin/nu_plugin_formats ''; }; home.packages = with pkgs; [ carapace ]; }; }