Refactor configs

This commit is contained in:
Bad 2021-04-11 18:04:01 +02:00
parent 97656f8e60
commit 0c8b07077e
7 changed files with 72 additions and 70 deletions

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
ungoogled-chromium ungoogled-chromium
]; ];
} }

View file

@ -11,7 +11,7 @@
package = pkgs.redshift-wlr; package = pkgs.redshift-wlr;
brightness.night = "0.75"; brightness.night = "0.75";
extraOptions = [ extraOptions = [
"-p redshift-wlr" "-p redshift-wlr"
]; ];
}; };

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
blender blender
]; ];
} }

View file

@ -1,7 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
home-manager.users.mae = { home-manager.users.mae = {
imports = [ ../profiles/git ../profiles/zsh ]; imports = [ ../profiles/git ../profiles/zsh ../profiles/neovim ];
home.packages = with pkgs; [ home.packages = with pkgs; [
arc-theme arc-theme
]; ];

View file

@ -1,57 +0,0 @@
{ pkgs, ... }:
{
enable = true;
vimdiffAlias = true;
withNodeJs = true;
plugins = with pkgs.vimPlugins; [
{
plugin = coc-nvim;
config = ''
nmap <silent> <F2> <Plug>(coc-rename)
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
" Remap <C-f> and <C-b> for scroll float windows/popups.
if has('nvim-0.4.0') || has('patch-8.2.0750')
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
endif
'';
}
fzf-vim
{
plugin = iceberg-vim;
config = "colorscheme iceberg";
}
vim-sleuth
coc-json
coc-html
coc-tsserver
neoformat
undotree
{
plugin = vim-jsdoc;
config = ''
let g:jsdoc_formatter = "tsdoc"
let g:typescript_indent_disable = 1
'';
}
];
extraConfig = ''
set background=dark
set termguicolors
set ic
set number
set autoindent
set completeopt=menuone,noinsert,noselect
set shortmess+=c
'';
}

View file

@ -0,0 +1,59 @@
{ pkgs, ... }:
programs.zsh = {
{
enable = true;
vimdiffAlias = true;
withNodeJs = true;
plugins = with pkgs.vimPlugins; [
{
plugin = coc-nvim;
config = ''
nmap <silent> <F2> <Plug>(coc-rename)
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
" Remap <C-f> and <C-b> for scroll float windows/popups.
if has('nvim-0.4.0') || has('patch-8.2.0750')
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
endif
'';
}
fzf-vim
{
plugin = iceberg-vim;
config = "colorscheme iceberg";
}
vim-sleuth
coc-json
coc-html
coc-tsserver
neoformat
undotree
{
plugin = vim-jsdoc;
config = ''
let g:jsdoc_formatter = "tsdoc"
let g:typescript_indent_disable = 1
'';
}
];
extraConfig = ''
set background=dark
set termguicolors
set ic
set number
set autoindent
set completeopt=menuone,noinsert,noselect
set shortmess+=c
'';
};
}

View file

@ -10,19 +10,19 @@
]; ];
}; };
initExtraFirst = '' initExtraFirst = ''
if [ -z "$TMUX" ] && [[ $- == *i* ]] if [ -z "$TMUX" ] && [[ $- == *i* ]]
then then
(tmux ls | grep -vq attached && tmux at) || tmux (tmux ls | grep -vq attached && tmux at) || tmux
exit exit
fi fi
${builtins.readFile ./p10k.zsh.initfirst} ${builtins.readFile ./p10k.zsh.initfirst}
''; '';
initExtra = '' initExtra = ''
source "${pkgs.fzf}/share/fzf/key-bindings.zsh" source "${pkgs.fzf}/share/fzf/key-bindings.zsh"
source "${pkgs.fzf}/share/fzf/completion.zsh" source "${pkgs.fzf}/share/fzf/completion.zsh"
${builtins.readFile ./p10k.zsh} ${builtins.readFile ./p10k.zsh}
''; '';
}; };
} }