113 lines
3.7 KiB
Nix
113 lines
3.7 KiB
Nix
|
{ config, pkgs, ... }:
|
||
|
|
||
|
{
|
||
|
home.username = "felixalb";
|
||
|
home.homeDirectory = "/home/felixalb";
|
||
|
home.stateVersion = "22.05";
|
||
|
|
||
|
programs = {
|
||
|
home-manager.enable = true;
|
||
|
alacritty = {
|
||
|
enable = true;
|
||
|
};
|
||
|
firefox.enable = true;
|
||
|
rofi.enable = true;
|
||
|
zsh = {
|
||
|
enable = true;
|
||
|
enableAutosuggestions = true;
|
||
|
enableSyntaxHighlighting = true;
|
||
|
prezto = {
|
||
|
enable = true;
|
||
|
prompt.theme = "paradox";
|
||
|
};
|
||
|
# initExtra = ''
|
||
|
# bindkey "''${key[Up]}" up-line-or-search
|
||
|
# bindkey "''${key[Down]}" down-line-or-search
|
||
|
# '';
|
||
|
};
|
||
|
git = {
|
||
|
enable = true;
|
||
|
userName = "Felix Albrigtsen";
|
||
|
userEmail = "felixalbrigtsen@gmail.com";
|
||
|
};
|
||
|
neovim = {
|
||
|
enable = true;
|
||
|
vimAlias = true;
|
||
|
|
||
|
extraConfig = ''
|
||
|
|
||
|
set number " Show line numbers
|
||
|
set number relativenumber " Enable hybrid line numbers
|
||
|
set nu rnu
|
||
|
set signcolumn=number
|
||
|
set showmatch " Highlight matching brace
|
||
|
set errorbells " Beep or flash screen on errors
|
||
|
|
||
|
set hlsearch " Highlight all search results
|
||
|
set smartcase " Enable smart-case search
|
||
|
set incsearch " Searches for strings incrementally
|
||
|
|
||
|
set autoindent " Auto-indent new lines
|
||
|
set expandtab " Use spaces instead of tabs
|
||
|
set shiftwidth=2 " Number of auto-indent spaces
|
||
|
set smartindent " Enable smart-indent
|
||
|
set smarttab " Enable smart-tabs
|
||
|
set softtabstop=0 " Number of spaces per Tab, auto
|
||
|
|
||
|
set updatetime=300 " Time interval for updating buffers
|
||
|
|
||
|
set ruler " Show row and column ruler information
|
||
|
|
||
|
set undolevels=1000 " Number of undo levels
|
||
|
set backspace=indent,eol,start " Backspace behaviour
|
||
|
|
||
|
'';
|
||
|
|
||
|
plugins = with pkgs.vimPlugins; [
|
||
|
vim-nix
|
||
|
vim-commentary
|
||
|
vim-devicons
|
||
|
{ plugin = nerdtree;
|
||
|
config = "
|
||
|
nmap <silent> <C-t> :NERDTreeToggle<CR>
|
||
|
autocmd VimEnter * NERDTree \" Autostart nerdtree on vim startup
|
||
|
autocmd VimEnter * wincmd p \" Unselect nerdtree window
|
||
|
\" Close vim if Nerdtree is the only buffer left
|
||
|
autocmd bufenter * if (winnr(\"$\") == 1 && exists(\"b:NERDTree\") && b:NERDTree.isTabTree()) | q | endif
|
||
|
";
|
||
|
}
|
||
|
];
|
||
|
withNodeJs = true;
|
||
|
coc = {
|
||
|
enable = true;
|
||
|
settings = {
|
||
|
"suggest.enablePreview" = true;
|
||
|
"suggest.enablePreselect" = true;
|
||
|
};
|
||
|
|
||
|
package = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||
|
pname = "coc.nvim";
|
||
|
version = "2022-05-21";
|
||
|
src = pkgs.fetchFromGitHub {
|
||
|
owner = "neoclide";
|
||
|
repo = "coc.nvim";
|
||
|
rev = "791c9f673b882768486450e73d8bda10e391401d";
|
||
|
sha256 = "sha256-MobgwhFQ1Ld7pFknsurSFAsN5v+vGbEFojTAYD/kI9c=";
|
||
|
};
|
||
|
meta.homepage = "https://github.com/neoclide/coc.nvim/";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
services = {
|
||
|
redshift = {
|
||
|
enable = true;
|
||
|
tray = true;
|
||
|
|
||
|
duskTime = "19:30-20:30";
|
||
|
dawnTime = "7:30-8:30";
|
||
|
};
|
||
|
};
|
||
|
}
|