67 lines
1.3 KiB
Nix
67 lines
1.3 KiB
Nix
|
{ lib, config, pkgs, ... }:
|
|||
|
|
|||
|
{
|
|||
|
# fish and zsh support for nix-shell
|
|||
|
home.packages = with pkgs; [ any-nix-shell ];
|
|||
|
|
|||
|
programs.zsh = {
|
|||
|
enable = true;
|
|||
|
enableAutosuggestions = true;
|
|||
|
enableCompletion = true;
|
|||
|
defaultKeymap = "viins";
|
|||
|
dotDir = ".config/zsh";
|
|||
|
|
|||
|
history = {
|
|||
|
path = "${config.xdg.dataHome}/zsh/zsh_history";
|
|||
|
expireDuplicatesFirst = true;
|
|||
|
ignorePatterns = [
|
|||
|
"rm *"
|
|||
|
"kill *"
|
|||
|
];
|
|||
|
};
|
|||
|
|
|||
|
oh-my-zsh.enable = true;
|
|||
|
|
|||
|
initExtra = ''
|
|||
|
any-nix-shell zsh --info-right | source /dev/stdin
|
|||
|
'';
|
|||
|
};
|
|||
|
|
|||
|
programs.starship = {
|
|||
|
enable = true;
|
|||
|
enableZshIntegration = config.programs.zsh.enable;
|
|||
|
settings = {
|
|||
|
add_newline = true;
|
|||
|
|
|||
|
format = lib.concatStrings [
|
|||
|
"$directory"
|
|||
|
"$git_branch"
|
|||
|
"$git_commit"
|
|||
|
"$git_state"
|
|||
|
"$git_metrics"
|
|||
|
"$git_status"
|
|||
|
"$shlvl"
|
|||
|
"$nix_shell"
|
|||
|
"$cmd_duration"
|
|||
|
"$jobs"
|
|||
|
"$line_break"
|
|||
|
"$character"
|
|||
|
];
|
|||
|
|
|||
|
character = {
|
|||
|
success_symbol = "[➜](bold green)";
|
|||
|
error_symbol = "[➜](bold red)";
|
|||
|
};
|
|||
|
|
|||
|
git_commit.commit_hash_length = 6;
|
|||
|
|
|||
|
shlvl = {
|
|||
|
disabled = false;
|
|||
|
format = "[$symbol$shlvl]($style) ";
|
|||
|
symbol = "↕️ ";
|
|||
|
threshold = 3;
|
|||
|
};
|
|||
|
};
|
|||
|
};
|
|||
|
}
|