2023-12-01 12:39:16 -05:00
|
|
|
|
{lib, ...}: {
|
|
|
|
|
imports = [./programs.nix];
|
2023-10-07 01:44:29 -04:00
|
|
|
|
|
2023-10-15 16:05:28 -04:00
|
|
|
|
programs = {
|
2023-10-15 15:11:59 -04:00
|
|
|
|
starship = let
|
2024-01-04 03:39:14 -05:00
|
|
|
|
# TODO: have different colors depending on host
|
2023-11-22 15:33:16 -05:00
|
|
|
|
textColor = "#e3e5e5";
|
|
|
|
|
firstColor = "#bd93f9";
|
2023-10-15 15:11:59 -04:00
|
|
|
|
secondColor = "#715895";
|
2023-11-22 15:33:16 -05:00
|
|
|
|
thirdColor = "#382c4a";
|
2023-10-15 15:11:59 -04:00
|
|
|
|
fourthColor = "#120e18";
|
|
|
|
|
in {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableBashIntegration = true;
|
|
|
|
|
settings = {
|
|
|
|
|
format = lib.concatStrings [
|
|
|
|
|
"╭╴"
|
|
|
|
|
"[](fg:${firstColor})"
|
|
|
|
|
"[ ](bg:${firstColor} fg:#090c0c)"
|
|
|
|
|
"[](bg:${secondColor} fg:${firstColor})"
|
|
|
|
|
"$username$hostname"
|
|
|
|
|
"$sudo"
|
|
|
|
|
"[](fg:${secondColor} bg:${thirdColor})"
|
|
|
|
|
"$directory"
|
|
|
|
|
"[](fg:${thirdColor} bg:${fourthColor})"
|
|
|
|
|
"$git_branch"
|
|
|
|
|
"[](fg:${fourthColor})"
|
|
|
|
|
"\n╰╴$shlvl$nix_shell$character"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
sudo = {
|
|
|
|
|
disabled = false;
|
|
|
|
|
style = "fg:${textColor} bg:${secondColor}";
|
|
|
|
|
format = "[as root ]($style)";
|
|
|
|
|
};
|
2023-10-07 02:04:31 -04:00
|
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
|
username = {
|
|
|
|
|
show_always = true;
|
|
|
|
|
style_user = "fg:${textColor} bg:${secondColor}";
|
|
|
|
|
style_root = "fg:red bg:${secondColor} blink";
|
|
|
|
|
format = "[ $user]($style)";
|
|
|
|
|
};
|
2023-10-07 01:44:29 -04:00
|
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
|
hostname = {
|
|
|
|
|
ssh_only = false;
|
|
|
|
|
style = "fg:${textColor} bg:${secondColor}";
|
|
|
|
|
format = "[@$hostname ]($style)";
|
|
|
|
|
};
|
2023-10-07 01:44:29 -04:00
|
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
|
directory = {
|
|
|
|
|
style = "fg:${firstColor} bg:${thirdColor}";
|
|
|
|
|
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 = {
|
|
|
|
|
style = "fg:${secondColor} bg:${fourthColor}";
|
|
|
|
|
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 = " ";
|
|
|
|
|
format = "[$symbol]($style)";
|
|
|
|
|
threshold = 1;
|
|
|
|
|
};
|
2023-10-07 14:16:51 -04:00
|
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
|
nix_shell = {
|
|
|
|
|
symbol = "❄️ ";
|
|
|
|
|
format = "[$symbol]($style)";
|
|
|
|
|
};
|
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 = {
|
2023-11-22 15:33:16 -05:00
|
|
|
|
sudo = "sudo ";
|
2023-10-15 15:11:59 -04:00
|
|
|
|
frick = "sudo $(fc -ln -1)";
|
|
|
|
|
|
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-10-18 11:55:51 -04:00
|
|
|
|
chore = "(cd ~/.nix; git add flake.lock; git commit -m 'chore: update flake.lock'; git push)";
|
2023-10-15 15:11:59 -04:00
|
|
|
|
};
|
|
|
|
|
|
2023-12-12 10:47:06 -05:00
|
|
|
|
#profileExtra = ''
|
|
|
|
|
#'';
|
2023-10-15 15:11:59 -04:00
|
|
|
|
bashrcExtra = ''
|
2023-12-29 15:23:50 -05:00
|
|
|
|
# Check if shell is interactive
|
|
|
|
|
[[ $- == *i* ]] || return 0
|
|
|
|
|
|
2023-10-15 15:11:59 -04:00
|
|
|
|
${lib.strings.fileContents ./config/dracula/less.sh}
|
|
|
|
|
${lib.strings.fileContents ./config/dracula/fzf.sh}
|
|
|
|
|
|
|
|
|
|
${lib.strings.fileContents ./config/colorgrid.sh}
|
|
|
|
|
${lib.strings.fileContents ./config/bashrc}
|
|
|
|
|
'';
|
|
|
|
|
#initExtra = ''
|
|
|
|
|
#'';
|
|
|
|
|
#logoutExtra = ''
|
|
|
|
|
#'';
|
|
|
|
|
};
|
2023-06-26 17:29:17 -04:00
|
|
|
|
};
|
|
|
|
|
}
|