132 lines
3.9 KiB
Nix
132 lines
3.9 KiB
Nix
|
|
{
|
||
|
|
home-manager.useGlobalPkgs = true;
|
||
|
|
home-manager.users.marcus = { config, pkgs, lib, ... }:{
|
||
|
|
# This value determines the Home Manager release that your
|
||
|
|
# configuration is compatible with. This helps avoid breakage
|
||
|
|
# when a new Home Manager release introduces backwards
|
||
|
|
# incompatible changes.
|
||
|
|
#
|
||
|
|
# You can update Home Manager without changing this value. See
|
||
|
|
# the Home Manager release notes for a list of state version
|
||
|
|
# changes in each release.
|
||
|
|
home.stateVersion = "22.11";
|
||
|
|
|
||
|
|
home.packages = with pkgs; [ ];
|
||
|
|
programs.starship = {
|
||
|
|
enable = true;
|
||
|
|
enableBashIntegration = true;
|
||
|
|
settings = {
|
||
|
|
add_newline = false;
|
||
|
|
format = lib.concatStrings [
|
||
|
|
"$username"
|
||
|
|
"$hostname"
|
||
|
|
"$directory"
|
||
|
|
"$jobs"
|
||
|
|
"$cmd_duration"
|
||
|
|
"$character"
|
||
|
|
];
|
||
|
|
directory = {
|
||
|
|
truncation_length = 10;
|
||
|
|
truncate_to_repo = false;
|
||
|
|
};
|
||
|
|
scan_timeout = 10;
|
||
|
|
character = {
|
||
|
|
success_symbol = "➜";
|
||
|
|
error_symbol = "➜";
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
programs.git = {
|
||
|
|
enable = true;
|
||
|
|
userName = "Marcus Godwin";
|
||
|
|
userEmail = "godwin3@gatech.edu";
|
||
|
|
};
|
||
|
|
programs.vim = {
|
||
|
|
enable = true;
|
||
|
|
plugins = with pkgs.vimPlugins; [
|
||
|
|
nerdcommenter vim-polyglot #parinfer-rust
|
||
|
|
];
|
||
|
|
settings = {
|
||
|
|
# Is the need for these obliviated by vim-polyglot using sleuth?
|
||
|
|
#expandtab = false;
|
||
|
|
tabstop = 4;
|
||
|
|
shiftwidth = 4;
|
||
|
|
};
|
||
|
|
extraConfig = ''
|
||
|
|
set number
|
||
|
|
set hlsearch
|
||
|
|
nnoremap <leader>m :bn<CR>
|
||
|
|
nnoremap <leader>t :tabnew<CR>
|
||
|
|
nnoremap <leader>. :tabn<CR>
|
||
|
|
nnoremap <leader>, :tabp<CR>
|
||
|
|
nnoremap <leader>v :vsplit<CR>
|
||
|
|
nnoremap <leader>h :split<CR>
|
||
|
|
nnoremap <leader>q :q<CR>
|
||
|
|
inoremap jk <Esc>
|
||
|
|
inoremap kj <Esc>
|
||
|
|
|
||
|
|
" Thanks to https://unix.stackexchange.com/questions/140898/vim-hide-status-line-in-the-bottom
|
||
|
|
let s:hidden_all = 0
|
||
|
|
function! ToggleHiddenAll()
|
||
|
|
if s:hidden_all == 0
|
||
|
|
let s:hidden_all = 1
|
||
|
|
set noshowmode
|
||
|
|
set noruler
|
||
|
|
set laststatus=0
|
||
|
|
set noshowcmd
|
||
|
|
else
|
||
|
|
let s:hidden_all = 0
|
||
|
|
set showmode
|
||
|
|
set ruler
|
||
|
|
set laststatus=2
|
||
|
|
set showcmd
|
||
|
|
endif
|
||
|
|
endfunction
|
||
|
|
|
||
|
|
nnoremap <S-h> :call ToggleHiddenAll()<CR>
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
programs.tmux = {
|
||
|
|
enable = true;
|
||
|
|
extraConfig = ''
|
||
|
|
#$Id: vim-keys.conf,v 1.2 2010-09-18 09:36:15 nicm Exp $
|
||
|
|
#
|
||
|
|
# vim-keys.conf, v1.2 2010/09/12
|
||
|
|
#
|
||
|
|
# By Daniel Thau. Public domain.
|
||
|
|
#
|
||
|
|
# This configuration file binds many vi- and vim-like bindings to the
|
||
|
|
# appropriate tmux key bindings. Note that for many key bindings there is no
|
||
|
|
# tmux analogue. This is intended for tmux 1.3, which handles pane selection
|
||
|
|
# differently from the previous versions
|
||
|
|
|
||
|
|
# split windows like vim
|
||
|
|
# vim's definition of a horizontal/vertical split is reversed from tmux's
|
||
|
|
bind s split-window -v
|
||
|
|
bind v split-window -h
|
||
|
|
|
||
|
|
# move around panes with hjkl, as one would in vim after pressing ctrl-w
|
||
|
|
bind h select-pane -L
|
||
|
|
bind j select-pane -D
|
||
|
|
bind k select-pane -U
|
||
|
|
bind l select-pane -R
|
||
|
|
|
||
|
|
# resize panes like vim
|
||
|
|
# feel free to change the "1" to however many lines you want to resize by, only
|
||
|
|
# one at a time can be slow
|
||
|
|
bind < resize-pane -L 1
|
||
|
|
bind > resize-pane -R 1
|
||
|
|
bind - resize-pane -D 1
|
||
|
|
bind + resize-pane -U 1
|
||
|
|
|
||
|
|
# bind : to command-prompt like vim
|
||
|
|
# this is the default in tmux already
|
||
|
|
bind : command-prompt
|
||
|
|
|
||
|
|
# vi-style controls for copy mode
|
||
|
|
setw -g mode-keys vi
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
};
|
||
|
|
}
|