2023-04-03 09:49:01 +02:00
|
|
|
{ pkgs, config, lib, ... }:
|
2023-03-31 20:48:53 +02:00
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.eboskma.programs.nushell;
|
2023-04-07 11:20:18 +02:00
|
|
|
|
2023-04-13 08:38:40 +02:00
|
|
|
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;
|
|
|
|
};
|
2023-03-31 20:48:53 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
options.eboskma.programs.nushell = { enable = mkEnableOption "nu shell"; };
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
programs.nushell = {
|
|
|
|
enable = true;
|
2023-05-21 22:14:46 +02:00
|
|
|
package = (pkgs.nushell.overrideAttrs (_oldAttrs: {
|
|
|
|
doCheck = false; # Skip tests, because they take forever to build using emulation
|
|
|
|
})).override { additionalFeatures = p: p ++ [ "dataframe" ]; };
|
2023-03-31 20:48:53 +02:00
|
|
|
configFile.source = ./config.nu;
|
|
|
|
envFile.source = ./env.nu;
|
2023-04-19 10:58:03 +02:00
|
|
|
|
|
|
|
extraEnv = ''
|
2023-08-19 19:38:39 +02:00
|
|
|
$env.command_not_found_db = ${config.programs.command-not-found.dbPath}
|
|
|
|
$env.NIX_SYSTEM = "${pkgs.system}"
|
2023-04-19 10:58:03 +02:00
|
|
|
'';
|
2023-04-24 08:26:09 +02:00
|
|
|
extraConfig = ''
|
|
|
|
alias vim = nvim
|
2023-09-11 20:11:08 +02:00
|
|
|
alias tree = ${pkgs.eza}/bin/eza -Fb --git --tree --icons
|
2023-04-25 09:48:32 +02:00
|
|
|
|
2023-08-19 19:38:39 +02:00
|
|
|
$env.LS_COLORS = (${pkgs.vivid}/bin/vivid generate gruvbox-dark | str trim)
|
2023-05-23 10:28:13 +02:00
|
|
|
|
2023-05-23 11:08:42 +02:00
|
|
|
register ${pkgs.nushellPlugins.query}/bin/nu_plugin_query
|
2023-05-23 10:28:13 +02:00
|
|
|
register ${nushell_plugin_formats}/bin/nu_plugin_formats
|
2023-05-30 15:35:45 +02:00
|
|
|
|
|
|
|
use kink.nu
|
2023-04-24 08:26:09 +02:00
|
|
|
'';
|
2023-03-31 20:48:53 +02:00
|
|
|
};
|
2023-04-03 14:34:21 +02:00
|
|
|
|
2023-09-11 20:11:41 +02:00
|
|
|
xdg.configFile."nushell/scripts" = {
|
|
|
|
source = ./scripts;
|
2023-05-30 15:35:45 +02:00
|
|
|
};
|
|
|
|
|
2023-04-13 08:38:40 +02:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
carapace
|
|
|
|
];
|
2023-03-31 20:48:53 +02:00
|
|
|
};
|
|
|
|
}
|