2024-01-24 18:39:18 -05:00
|
|
|
|
{
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
...
|
|
|
|
|
}: let
|
|
|
|
|
inherit (lib) concatStrings fileContents;
|
|
|
|
|
inherit (config.vars) promptColors;
|
2024-01-22 11:09:37 -05:00
|
|
|
|
in {
|
2023-12-01 12:39:16 -05:00
|
|
|
|
imports = [./programs.nix];
|
2023-10-07 01:44:29 -04:00
|
|
|
|
|
2023-10-15 16:05:28 -04:00
|
|
|
|
programs = {
|
2024-01-22 11:09:37 -05:00
|
|
|
|
starship = {
|
2023-10-15 15:11:59 -04:00
|
|
|
|
enable = true;
|
|
|
|
|
enableBashIntegration = true;
|
2024-01-24 18:39:18 -05:00
|
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
|
settings = {
|
2024-01-24 18:39:18 -05:00
|
|
|
|
format = concatStrings [
|
2023-10-15 15:11:59 -04:00
|
|
|
|
"╭╴"
|
2024-01-24 18:39:18 -05:00
|
|
|
|
"[](fg:${promptColors.firstColor})"
|
|
|
|
|
"[ ](bg:${promptColors.firstColor} fg:#090c0c)"
|
|
|
|
|
"[](bg:${promptColors.secondColor} fg:${promptColors.firstColor})"
|
2023-10-15 15:11:59 -04:00
|
|
|
|
"$username$hostname"
|
2024-01-24 18:39:18 -05:00
|
|
|
|
"[](fg:${promptColors.secondColor} bg:${promptColors.thirdColor})"
|
2023-10-15 15:11:59 -04:00
|
|
|
|
"$directory"
|
2024-01-24 18:39:18 -05:00
|
|
|
|
"[](fg:${promptColors.thirdColor} bg:${promptColors.fourthColor})"
|
2023-10-15 15:11:59 -04:00
|
|
|
|
"$git_branch"
|
2024-03-27 01:29:03 -04:00
|
|
|
|
"[](fg:${promptColors.fourthColor})$shlvl$nix_shell"
|
|
|
|
|
"\n╰╴$character"
|
2023-10-15 15:11:59 -04:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
username = {
|
|
|
|
|
show_always = true;
|
2024-01-24 18:39:18 -05:00
|
|
|
|
style_user = "fg:${promptColors.textColor} bg:${promptColors.secondColor}";
|
|
|
|
|
style_root = "fg:red bg:${promptColors.secondColor} blink";
|
2023-10-15 15:11:59 -04:00
|
|
|
|
format = "[ $user]($style)";
|
|
|
|
|
};
|
2023-10-07 01:44:29 -04:00
|
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
|
hostname = {
|
|
|
|
|
ssh_only = false;
|
2024-01-24 18:39:18 -05:00
|
|
|
|
style = "fg:${promptColors.textColor} bg:${promptColors.secondColor}";
|
2023-10-15 15:11:59 -04:00
|
|
|
|
format = "[@$hostname ]($style)";
|
|
|
|
|
};
|
2023-10-07 01:44:29 -04:00
|
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
|
directory = {
|
2024-01-24 18:39:18 -05:00
|
|
|
|
style = "fg:${promptColors.firstColor} bg:${promptColors.thirdColor}";
|
2023-10-15 15:11:59 -04:00
|
|
|
|
format = "[ $path ]($style)";
|
|
|
|
|
truncate_to_repo = false;
|
|
|
|
|
truncation_length = 0;
|
|
|
|
|
|
|
|
|
|
substitutions = {
|
|
|
|
|
"Documents" = " ";
|
|
|
|
|
"Downloads" = " ";
|
|
|
|
|
"Music" = " ";
|
|
|
|
|
"Pictures" = " ";
|
|
|
|
|
};
|
2023-10-07 14:16:51 -04:00
|
|
|
|
};
|
2023-10-07 01:44:29 -04:00
|
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
|
git_branch = {
|
2024-01-24 18:39:18 -05:00
|
|
|
|
style = "fg:${promptColors.secondColor} bg:${promptColors.fourthColor}";
|
2023-10-15 15:11:59 -04:00
|
|
|
|
symbol = "";
|
|
|
|
|
format = "[ $symbol $branch ]($style)";
|
|
|
|
|
};
|
2023-10-07 14:16:51 -04:00
|
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
|
shlvl = {
|
|
|
|
|
disabled = false;
|
|
|
|
|
repeat = true;
|
|
|
|
|
symbol = " ";
|
2024-03-24 12:56:53 -04:00
|
|
|
|
format = "[ $symbol]($style)";
|
2023-10-15 15:11:59 -04:00
|
|
|
|
threshold = 1;
|
|
|
|
|
};
|
2023-10-07 14:16:51 -04:00
|
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
|
nix_shell = {
|
|
|
|
|
symbol = "❄️ ";
|
2024-03-24 12:56:53 -04:00
|
|
|
|
format = "[ $symbol]($style)";
|
2023-10-15 15:11:59 -04:00
|
|
|
|
};
|
2023-10-07 14:16:51 -04:00
|
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
|
character = {
|
|
|
|
|
success_symbol = "[\\$](bold green)";
|
|
|
|
|
error_symbol = "[\\$](bold red)";
|
|
|
|
|
};
|
2023-10-07 14:16:51 -04:00
|
|
|
|
};
|
2023-10-07 01:44:29 -04:00
|
|
|
|
};
|
|
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
|
bash = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableCompletion = true;
|
|
|
|
|
|
2023-11-22 15:33:16 -05:00
|
|
|
|
historyFile = "\$HOME/.cache/.bash_history";
|
2023-10-15 15:11:59 -04:00
|
|
|
|
historyFileSize = 100000; # default
|
2023-11-22 15:33:16 -05:00
|
|
|
|
historySize = 10000; # default
|
|
|
|
|
historyControl = [
|
2023-10-15 15:11:59 -04:00
|
|
|
|
"erasedups"
|
|
|
|
|
"ignorespace"
|
|
|
|
|
];
|
|
|
|
|
historyIgnore = [
|
|
|
|
|
"ls"
|
|
|
|
|
"exit"
|
|
|
|
|
"logout"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
shellOptions = [
|
|
|
|
|
"histappend"
|
|
|
|
|
"checkwinsize"
|
|
|
|
|
"extglob"
|
|
|
|
|
"globstar"
|
|
|
|
|
"checkjobs"
|
|
|
|
|
"autocd"
|
|
|
|
|
"cdspell"
|
|
|
|
|
"dirspell"
|
|
|
|
|
"dotglob"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
shellAliases = {
|
2024-01-08 11:25:18 -05:00
|
|
|
|
# Add whitespace after, to allow
|
|
|
|
|
# sudo to inherit all other aliases
|
2023-11-22 15:33:16 -05:00
|
|
|
|
sudo = "sudo ";
|
2023-10-15 15:11:59 -04:00
|
|
|
|
|
2023-11-22 15:33:16 -05:00
|
|
|
|
ls = "ls -lah --color=auto";
|
|
|
|
|
tree = "tree -a -I node_modules";
|
|
|
|
|
cp = "cp -r";
|
2023-10-15 15:11:59 -04:00
|
|
|
|
};
|
|
|
|
|
|
2023-12-12 10:47:06 -05:00
|
|
|
|
#profileExtra = ''
|
|
|
|
|
#'';
|
2024-01-08 11:25:18 -05:00
|
|
|
|
bashrcExtra =
|
|
|
|
|
/*
|
|
|
|
|
bash
|
|
|
|
|
*/
|
|
|
|
|
''
|
|
|
|
|
# Check if shell is interactive
|
|
|
|
|
[[ $- == *i* ]] || return 0
|
|
|
|
|
|
2024-01-22 11:09:37 -05:00
|
|
|
|
${fileContents ./config/dracula/less.sh}
|
|
|
|
|
${fileContents ./config/dracula/fzf.sh}
|
2024-01-08 11:25:18 -05:00
|
|
|
|
|
2024-01-22 11:09:37 -05:00
|
|
|
|
${fileContents ./config/colorgrid.sh}
|
|
|
|
|
${fileContents ./config/bashrc}
|
2024-01-08 11:25:18 -05:00
|
|
|
|
'';
|
2023-10-15 15:11:59 -04:00
|
|
|
|
#initExtra = ''
|
|
|
|
|
#'';
|
|
|
|
|
#logoutExtra = ''
|
|
|
|
|
#'';
|
|
|
|
|
};
|
2023-06-26 17:29:17 -04:00
|
|
|
|
};
|
|
|
|
|
}
|