-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli.nix
129 lines (113 loc) · 2.95 KB
/
cli.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{ pkgs, ... }:
{
# === My Packages ===
# custom font
fonts.fontconfig.enable = true;
home.packages = [
# custom font
#(pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
pkgs.nerd-fonts.jetbrains-mono
];
# === Sourced files ===
home.file = {
# wezterm config using lua
"./.config/wezterm/".source = ./wezterm;
};
# === My Programs ===
programs = {
# ZSH
zsh = {
enable = true;
autosuggestion.enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
initExtra = ''
[[ ! $(command -v nix) && -e "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh" ]] && source "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh"
'';
shellAliases = {
cat = "bat";
};
oh-my-zsh = {
enable = true;
extraConfig = ''
# ZSH AUTOCOMPLETE -> https://github.com/marlonrichert/zsh-autocomplete/blob/main/.zshrc
zstyle ':autocomplete:*' list-lines 8
zstyle ':autocomplete:history-search:*' list-lines 8
zstyle ':autocomplete:history-incremental-search-*:*' list-lines 8
zstyle ':autocomplete:*' insert-unambiguous yes
'';
plugins = [
"docker-compose"
"git"
];
};
};
# Starship
starship = {
enable = true;
enableZshIntegration = true;
settings = {
# Prompt
format = "[░▒▓](#a3aed2)[ ](bg:#a3aed2 fg:#090c0c)$battery[](fg:#a3aed2) $directory$all";
# Inserts a blank line between shell prompt
add_newline = true;
# Bettery status plugin
battery = {
format = "[▓](#a3aed2)[ $symbol ]('')[ $percentage ](bg:#a3aed2 fg:#090c0c)";
full_symbol = "";
charging_symbol = "";
display = [
{
threshold = 30;
discharging_symbol = "";
}
{
threshold = 90;
discharging_symbol = "";
}
];
};
# directory plugin
directory = {
truncation_length = 1;
truncate_to_repo = false;
fish_style_pwd_dir_length = 1;
};
};
};
# Git
git = {
enable = true; # download & configure
userName = "Tshiamo Bhuda";
userEmail = "tshiamobhuda@gmail.com";
extraConfig = {
init.defaultBranch = "main";
core.editor = "nvim";
push.autoSetupRemote = true;
pull.rebase = false;
};
};
# lazygit
lazygit.enable = true;
# Eza
eza = {
enable = true;
enableZshIntegration = true;
git = true;
icons = "auto";
};
# Ffz
fzf = {
enable = true;
enableZshIntegration = true;
};
# JQ
jq.enable = true;
# Terminal
wezterm = {
enable = true;
enableZshIntegration = true;
};
bat.enable = true;
};
}