2024-02-05 11:46:52 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2023-03-31 20:48:53 +02:00
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.eboskma.programs.nushell;
|
|
|
|
in
|
|
|
|
{
|
2024-02-05 11:46:52 +01:00
|
|
|
options.eboskma.programs.nushell = {
|
|
|
|
enable = mkEnableOption "nu shell";
|
|
|
|
};
|
2023-03-31 20:48:53 +02:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2024-02-22 11:33:31 +01:00
|
|
|
programs = {
|
|
|
|
nushell = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.nushellFull;
|
|
|
|
configFile.source = ./config.nu;
|
|
|
|
envFile.source = ./env.nu;
|
2023-11-20 17:04:47 +01:00
|
|
|
|
2024-02-22 11:33:31 +01:00
|
|
|
extraEnv = ''
|
|
|
|
$env.command_not_found_db = ${config.programs.command-not-found.dbPath}
|
|
|
|
$env.NIX_SYSTEM = "${pkgs.system}"
|
2024-01-29 10:03:11 +01:00
|
|
|
|
2024-02-22 11:33:31 +01:00
|
|
|
$env.NU_LIB_DIRS = ($env.NU_LIB_DIRS | append ${pkgs.nu_scripts}/share/nu_scripts)
|
|
|
|
'';
|
|
|
|
extraConfig = ''
|
|
|
|
alias vim = nvim
|
|
|
|
alias tree = ${pkgs.eza}/bin/eza -F -b --git --tree --icons
|
2023-04-25 09:48:32 +02:00
|
|
|
|
2024-02-22 11:33:31 +01:00
|
|
|
$env.LS_COLORS = (${pkgs.vivid}/bin/vivid generate gruvbox-dark | str trim)
|
2023-05-23 10:28:13 +02:00
|
|
|
|
2024-02-22 11:33:31 +01:00
|
|
|
register ${pkgs.nushellPlugins.query}/bin/nu_plugin_query
|
|
|
|
register ${pkgs.nushellPlugins.formats}/bin/nu_plugin_formats
|
2023-05-30 15:35:45 +02:00
|
|
|
|
2024-02-22 11:33:31 +01:00
|
|
|
use kink.nu
|
2023-11-20 17:04:47 +01:00
|
|
|
|
2024-02-22 11:33:31 +01:00
|
|
|
# use ${pkgs.nu_scripts}/share/nu_scripts/themes/nu-themes/dracula.nu
|
|
|
|
use themes/nu-themes/dracula.nu
|
2024-01-29 10:03:11 +01:00
|
|
|
|
2024-02-22 11:33:31 +01:00
|
|
|
$env.config = ($env.config | merge { color_config: (dracula)})
|
|
|
|
'';
|
|
|
|
};
|
2024-03-11 17:52:37 +01:00
|
|
|
# register ${pkgs.nushellPlugins.net}/bin/nu_plugin_net
|
2023-11-20 17:04:47 +01:00
|
|
|
|
2024-02-22 11:33:31 +01:00
|
|
|
carapace = {
|
|
|
|
enable = true;
|
|
|
|
};
|
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; [
|
2024-02-22 11:33:31 +01:00
|
|
|
# carapace
|
2023-11-20 17:04:47 +01:00
|
|
|
nu_scripts
|
2023-04-13 08:38:40 +02:00
|
|
|
];
|
2023-03-31 20:48:53 +02:00
|
|
|
};
|
|
|
|
}
|