FQAU62HXEV65NM37H6J3C73WE2WHYQGZXFF5BHPX7UMMUKP2WKQQC
EEXHTMT34GNFRB6KMQ5YKMI444SG2K7CU3DW5TFADWYUJ6BFFCZQC
XWDYSQGRZY2ALY4IS7RJNLNDAKKTLSPMHJTRNQ4NAPVTCCVQOKRAC
GGKSPLOM4NMOFIKWY5DUIYUL7QFU4UQ54GWS2ER7Z3R3YW4SKVRQC
DS7SOC5JPXET4MUGWQQEADPKHUTMMHRQJJQ4CB2PEK74UDGTWEYAC
EFMWW3NV3KNHTLABESQULQCAV2QJD5REO2GEDR3BIN4G36GHPSLQC
EQIYV4GQF2HJB6AGRGBCSBZSETC7EZ2SOZOMYFRNNN7RODZ5EQ3QC
5NJLIAJTJRIBFF7BWKXA5K7CFWCRET7O3GTMA2ZE5CTHKL7SC6FAC
AJRVVQ5HZWHWSESHB2LI5JNIQZHKJNX4AB52EN4HZQ66WD3C4SFAC
{ config, pkgs, ... }: {
nixpkgs.config = {
allowUnfree = true;
};
home.packages = with pkgs; [
discord
];
}
# A lot of this is gotten from https://github.com/alexarice/dotfiles/blob/18557c8e0bdd1c564ea68f8bb25a1894973d254d/dotfiles/sway.nix
{config, pkgs, lib, ...}:
let
inherit (config) dots scripts modifier;
in
{
wayland.windowManager.sway = {
enable = true;
package = pkgs.sway;
config = {
bars = [];
colors = {
focused = {
border = "#81c1e4";
background = "#81c1e4";
text = "#FFFFFF";
indicator = "#2e9ef4";
childBorder = "#81c1e4";
};
focusedInactive = {
border = "#282a36";
background = "#282a36";
text = "#999999";
indicator = "#484e50";
childBorder = "#282a36";
};
unfocused = {
border = "#282a36";
background = "#282a36";
text = "#999999";
indicator = "#282a36";
childBorder = "#282a36";
};
urgent = {
border = "#FF0000";
background = "#8C5665";
text = "#FF0000";
indicator = "#900000";
childBorder = "#FF0000";
};
};
fonts = [ "Source Code Pro 9" ];
gaps = {
inner = 1;
outer = 1;
bottom = 0;
smartBorders = "on";
};
inherit modifier;
terminal = "alacritty";
workspaceAutoBackAndForth = true;
keybindings = lib.mkOptionDefault {
"${modifier}+n" = "exec caja";
"${modifier}+m" = "exec \"GDK_BACKEND=x11 thunderbird\"";
"${modifier}+b" = lib.mkForce "exec emacsclient -c";
"${modifier}+c" = "exec firefox";
#"${modifier}+p" = "exec ${scripts + "/take_screenshot"}";
#"${modifier}+Shift+p" = "exec ${scripts + "/take_screenshot"} full";
"${modifier}+l" = "exec \"swaylock -f -c 000000\"";
"XF86MonBrightnessUp" = "exec \"brillo -A 1\"";
"XF86MonBrightnessDown" = "exec \"brillo -U 1\"";
"XF86AudioLowerVolume" = "exec \"pactl set-sink-volume 0 -5%\"";
"XF86AudioRaiseVolume" = "exec \"pactl set-sink-volume 0 +5%\"";
"XF86AudioPlay" = "exec \"playerctl play\"";
"XF86AudioPause" = "exec \"playerctl pause\"";
"XF86AudioNext" = "exec \"playerctl next\"";
"XF86AudioPrev" = "exec \"playerctl previous\"";
"${modifier}+x" = "exec networkmanager_dmenu";
"${modifier}+Ctrl+r" = "exec reboot";
"${modifier}+Ctrl+k" = "exec \"shutdown -h now\"";
"${modifier}+Ctrl+s" = "exec \"swaylock -f -c 000000 && systemctl suspend\"";
};
window = {
border = 1;
titlebar = false;
};
startup = [
#{ command = "dropbox start"; always = true; }
{ command = "mako"; always = true; }
];
input = {
"2:7:SynPS/2_Synaptics_TouchPad" = {
natural_scroll = "enabled";
};
"1739:0:Synaptics_TM2668-002" = {
natural_scroll = "enabled";
};
};
};
};
}
pkgs:
{
enable = true;
vimAlias = true;
withPython = true;
withNodeJs = true;
plugins = with pkgs.vimPlugins; [
coc-nvim
auto-pairs
lightline-vim
vim-highlightedyank
vim-rooter
fzf-vim
base16-vim
typescript-vim
vim-nix
#vim-jsx-typescript
#vim-floaterm
];
extraConfig = ''
set nocompatible
set shell=/bin/bash
set hidden
set number relativenumber
set showcmd
set incsearch
set hlsearch
set shiftwidth=4
set tabstop=4
let mapleader=" "
"COC
set cmdheight=2
set updatetime=300
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
nmap <silent> gd <Plug>(coc-definition)
" Remap for do codeAction of selected region
function! s:cocActionsOpenFromSelected(type) abort
execute 'CocCommand actions.open ' . a:type
endfunction
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)
xmap <silent> <leader>a :<C-u>execute 'CocCommand actions.open ' . visualmode()<CR>
nmap <silent> <leader>a :<C-u>set operatorfunc=<SID>cocActionsOpenFromSelected<CR>
command! -nargs=0 Format :call CocAction('format')
autocmd BufWritePre * :Format
let g:coc_global_extensions=[ 'coc-omnisharp', 'coc-rust-analyzer', 'coc-go', 'coc-actions', 'coc-tsserver', 'coc-emmet', 'coc-css', 'coc-tsserver', 'coc-prettier']
"FZF
let $FZF_DEFAULT_COMMAND = "rg --files"
let $FZF_DEFAULT_OPTS=' --color=dark --color=fg:15,bg:-1,hl:1,fg+:#ffffff,bg+:#343D46,hl+:1 --color=info:0,prompt:0,pointer:12,marker:4,spinner:11,header:-1 --layout=reverse --margin=1,4'
let g:fzf_layout = { 'window': 'call FloatingFZF()' }
function! FloatingFZF()
let buf = nvim_create_buf(v:false, v:true)
call setbufvar(buf, '&signcolumn', 'no')
let height = float2nr(12)
let width = float2nr(80)
let horizontal = float2nr((&columns - width) / 2)
let vertical = 1
let opts = {
\ 'relative': 'editor',
\ 'row': vertical,
\ 'col': horizontal,
\ 'width': width,
\ 'height': height,
\ 'style': 'minimal'
\ }
call nvim_open_win(buf, v:true, opts)
endfunction
"BASE16
let base16colorspace=256 " Access colors present in 256 colorspace
if filereadable(expand("~/.vimrc_background"))
let base16colorspace=256
source ~/.vimrc_background
endif
set guifont=FiraCode:h12
nnoremap <c-t> :FloatermToggle <CR>
nnoremap <silent> ; :call fzf#vim#files('.', {'options': '--prompt ""'})<CR> nnoremap <silent> <leader>b :Buffers<CR>
noremap <c-c> <esc>
'';
}
{config, pkgs, ...}:
let
extensions = with pkgs.vscode-extensions; [
bbenoist.Nix
#matklad.rust-analyzer
ms-vscode.cpptools
vscodevim.vim
vscode = pkgs.vscode-with-extensions.override {
vscodeExtensions = extensions;
};
in
{
home.packages = [
vscode
];
}
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name="rust-analyzer";
publisher="matklad";
version="0.2.297";
sha256 = "0pj29k5pm1p7f987x9rjd0pks552fxvjv72dscxsk84svl132s0f";
}
{
name="CMake";
publisher="twxs";
version="0.0.17";
sha256 = "11hzjd0gxkq37689rrr2aszxng5l9fwpgs9nnglq3zhfa1msyn08";
}
];
}
{
name="cmake-tools";
publisher="ms-vscode";
version="1.4.2";
sha256 = "1azjqd5w14q1h8z6cib4lwyk3h9hl1lzzrnc150inn0c7v195qcl";