71 lines
1.5 KiB
Nix
71 lines
1.5 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
inputs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.nushell;
|
|
inherit (lib) mkEnableOption mkIf mkOption;
|
|
in
|
|
{
|
|
options.nushell = {
|
|
enable = mkEnableOption "nushell";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
home.shell.enableNushellIntegration = true;
|
|
programs = {
|
|
nushell = {
|
|
enable = true;
|
|
configFile.text = ''
|
|
$env.config.edit_mode = "vi"
|
|
$env.config.buffer_editor = "nvim"
|
|
$env.config.show_banner = false
|
|
$env.EDITOR = "nvim"
|
|
'';
|
|
shellAliases = {
|
|
lg = "lazygit";
|
|
js = "jj status";
|
|
jd = "jj diff";
|
|
jn = "jj new";
|
|
jf = "jj git fetch";
|
|
jp = "jj git push";
|
|
};
|
|
};
|
|
nix-your-shell = {
|
|
enable = true;
|
|
enableNushellIntegration = true;
|
|
};
|
|
direnv = {
|
|
enable = true;
|
|
enableNushellIntegration = true;
|
|
nix-direnv.enable = true;
|
|
config = {
|
|
hide_env_diff = true;
|
|
};
|
|
};
|
|
eza = {
|
|
enable = true;
|
|
enableNushellIntegration = false;
|
|
extraOptions = [ "--group-directories-first" ];
|
|
};
|
|
starship = {
|
|
enable = true;
|
|
enableNushellIntegration = true;
|
|
settings = {
|
|
nodejs.disabled = true;
|
|
package.disabled = true;
|
|
aws.disabled = true;
|
|
python.disabled = true;
|
|
};
|
|
};
|
|
|
|
zoxide = {
|
|
enableNushellIntegration = true;
|
|
};
|
|
};
|
|
};
|
|
}
|