mirror of
https://github.com/Smaug123/nix-dotfiles
synced 2025-10-25 08:08:40 +00:00
Compare commits
7 Commits
5e3f257ce6
...
b9bb4c49fa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9bb4c49fa | ||
|
|
75c77e99c0 | ||
|
|
d2718febf8 | ||
|
|
ef6d3d4445 | ||
|
|
b3eb9adb9f | ||
|
|
ada02e558b | ||
|
|
ae96250101 |
23
home-manager/.zshrc
Normal file
23
home-manager/.zshrc
Normal file
@@ -0,0 +1,23 @@
|
||||
prompt_custom() {
|
||||
local cyan='%F{cyan}'
|
||||
local red='%F{red}'
|
||||
local blue='%F{blue}'
|
||||
local reset_color='%f'
|
||||
|
||||
local git_info=$(git symbolic-ref --short HEAD 2> /dev/null || git describe --tags --exact-match 2> /dev/null || git rev-parse --short HEAD 2> /dev/null)
|
||||
if [[ -n "$git_info" ]]; then
|
||||
# escape the percent character, which is the only zsh prompt metacharacter
|
||||
git_info=$git_info:s/%/%%/
|
||||
git_info=" ${blue}git:${reset_color}${red}(${git_info})${reset_color}"
|
||||
else
|
||||
git_info=""
|
||||
fi
|
||||
|
||||
# %1 is the name of cwd
|
||||
PROMPT="${cyan}%1~${reset_color}${git_info} > "
|
||||
}
|
||||
|
||||
# Full path to cwd, with `~` for any initial home component, in light green,
|
||||
RPROMPT='%F{155}%~%f'
|
||||
|
||||
precmd_functions+=(prompt_custom)
|
||||
@@ -21,6 +21,8 @@
|
||||
# changes in each release.
|
||||
home.stateVersion = "22.05";
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
programs.tmux = {
|
||||
shell = "${nixpkgs.zsh}/bin/zsh";
|
||||
escapeTime = 50;
|
||||
@@ -41,11 +43,6 @@
|
||||
history = {
|
||||
expireDuplicatesFirst = true;
|
||||
};
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = ["git" "macos" "dircycle" "timer"];
|
||||
theme = "robbyrussell";
|
||||
};
|
||||
sessionVariables = {
|
||||
EDITOR = "vim";
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
@@ -61,6 +58,7 @@
|
||||
sessionVariables = {
|
||||
RIPGREP_CONFIG_PATH = "/Users/${username}/.config/ripgrep/config";
|
||||
};
|
||||
initExtra = builtins.readFile ./.zshrc;
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
@@ -208,6 +206,17 @@
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
font = {
|
||||
normal = {
|
||||
family = "FiraCode Nerd Font Mono";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
nixpkgs.keepassxc
|
||||
nixpkgs.rust-analyzer
|
||||
@@ -253,6 +262,7 @@
|
||||
nixpkgs.ffmpeg
|
||||
nixpkgs.bat
|
||||
nixpkgs.pandoc
|
||||
(nixpkgs.nerdfonts.override {fonts = ["FiraCode" "DroidSansMono"];})
|
||||
];
|
||||
|
||||
home.file.".mailcap".source = ./mailcap;
|
||||
|
||||
@@ -191,12 +191,6 @@ map <c-space> ?
|
||||
" Disable highlight when <leader><cr> is pressed
|
||||
map <silent> <leader><cr> :noh<cr>
|
||||
|
||||
" Smart way to move between windows
|
||||
map <C-j> <C-W>j
|
||||
map <C-k> <C-W>k
|
||||
map <C-h> <C-W>h
|
||||
map <C-l> <C-W>l
|
||||
|
||||
" Close the current buffer
|
||||
map <leader>bd :Bclose<cr>:tabclose<cr>gT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user