dotfiles/nix/home.nix

287 lines
7.2 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
with lib;
let
2020-02-08 00:03:42 -08:00
git-plan = pkgs.rustPlatform.buildRustPackage rec {
name = "git-plan";
2020-02-08 00:03:42 -08:00
version = "1";
src = pkgs.fetchFromGitLab {
owner = "haaksmash";
repo = "git-plan";
rev = "518dcf15f3a46605f18569dd69b3b63d763e9439";
sha256 = "06gh3v35bdr0qsp459183br4hpmwm36d2r9fjyx9j5jfpzggqg51";
};
2021-08-20 23:04:55 -07:00
cargoSha256 = "17lr4pc2fjcgvx0p4vpkwx3mg9jadb4lygbwri0blmnkqql8xlh3";
nativeBuildInputs = [ pkgs.pkgconfig ];
buildInputs = [ pkgs.openssl ] ++ (if pkgs.stdenv.isDarwin then [ pkgs.libiconv pkgs.darwin.apple_sdk.frameworks.Security ] else []);
};
vim-goyo = pkgs.vimUtils.buildVimPlugin {
name = "vim-goyo";
src = pkgs.fetchFromGitHub {
owner = "junegunn";
repo = "goyo.vim";
rev = "6b6ed2734084fdbb6315357ddcaecf9c8e6f143d";
sha256 = "1ywlz1hn54kxyp5q0angriaarimq7ys7m6sk6l4x8jr1g2yh0afz";
};
};
2020-12-16 22:29:36 -08:00
vim-elm-syntax = pkgs.vimUtils.buildVimPlugin {
name = "vim-elm-syntax";
src = pkgs.fetchFromGitHub {
2020-12-16 22:29:36 -08:00
owner = "andys8";
repo = "vim-elm-syntax";
rev = "68cd8988fe9eaa190052fadaee0fea2c21338d4c";
sha256 = "0yhvx8k83xfzmgy10r9mz0rjagbyzx5rrmn8123vw49ncksvw49q";
};
};
vim-nix = pkgs.vimUtils.buildVimPlugin {
name = "vim-nix";
src = pkgs.fetchFromGitHub {
owner = "LnL7";
repo = "vim-nix";
rev = "d733cb96707a2a6bdc6102b6d89f947688e0e959";
sha256 = "12k2gwm8b1n02361gpjhsldql99yd7qsh80a3lbwc5c5gz5j8jsb";
};
};
2021-08-21 00:37:33 -07:00
in
{
home.packages = with pkgs; [
git-plan
htop
2019-08-24 02:38:08 -07:00
jq
2019-03-07 13:25:21 -08:00
keybase
lastpass-cli
2020-06-08 22:54:02 -07:00
lorri
2020-12-16 23:13:43 -08:00
nnn
2019-07-23 21:25:25 -07:00
tree
2019-03-02 23:45:02 -08:00
ripgrep
zsh-autosuggestions
zsh-history-substring-search
2019-03-02 23:45:02 -08:00
zsh-syntax-highlighting
];
programs.direnv = {
enable = true;
stdlib = readFile ./direnv/direnvrc;
};
programs.git = {
enable = true;
userName = "Haak Saxberg";
userEmail = "haak.erling@gmail.com";
2019-03-02 23:43:44 -08:00
ignores = [
".idea/"
2019-03-07 10:22:46 -08:00
".direnv/"
".git-plans/"
".envrc"
2019-03-02 23:43:44 -08:00
".tools-info"
"*~"
"*.swp"
".yardoc/"
"doc/"
2019-03-02 23:43:44 -08:00
];
};
programs.zsh = {
enable = true;
enableCompletion = true;
defaultKeymap = "viins";
initExtra = readFile ./zsh/zshrc;
oh-my-zsh = {
enable = true;
2020-02-12 23:07:08 -08:00
theme = "typewritten";
custom = "$HOME/.oh-my-zsh/custom";
plugins = [
"vi-mode"
"git"
"z"
];
};
};
programs.kakoune = {
enable = true;
config = {
numberLines = {
enable = true;
highlightCursor = true;
relative = true;
};
};
2020-12-16 22:29:36 -08:00
plugins = with pkgs.kakounePlugins; [
kak-prelude
kak-fzf
kak-auto-pairs
kak-ansi
];
extraConfig = ''
colorscheme tomorrow-night
set -add global autoinfo normal
# FZF settings
map global normal <c-p> ': fzf-mode<ret>'
'';
};
programs.neovim = {
enable = true;
vimAlias = true;
plugins = with pkgs.vimPlugins; [
vim-sensible
vim-startify
2021-08-20 21:35:48 -07:00
papercolor-theme
vim-elixir
alchemist-vim
2020-12-16 22:29:36 -08:00
vim-elm-syntax
vim-nix
vim-javascript
vim-json
vim-jsx-pretty
2021-08-20 21:35:48 -07:00
vim-commentary
vim-airline
2021-08-21 00:37:33 -07:00
{
plugin = rainbow;
config = ''
let g:rainbow_conf = {
\ 'guifgs': ['RoyalBlue3', 'SeaGreen3', 'DarkOrchid3', 'firebrick3', 'RoyalBlue3', 'SeaGreen3', 'DarkOrchid3', 'firebrick3', 'RoyalBlue3', 'DarkOrchid3', 'firebrick3', 'RoyalBlue3', 'SeaGreen3', 'DarkOrchid3', 'firebrick3'],
\ 'ctermfgs': ['red', 'brown', 'blue', 'gray', 'green', 'magenta', 'cyan', 'darkred', 'brown', 'darkblue', 'gray', 'darkgreen', 'darkmagenta', 'darkcyan', 'red'],
\ 'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold']
\}
let g:rainbow_active = 1
2021-08-20 23:04:55 -07:00
'';
2021-08-21 00:37:33 -07:00
}
vim-signify
vim-indent-guides
vim-surround
fugitive
2021-08-21 00:37:33 -07:00
{
plugin = easymotion;
config = ''
map / <Plug>(easymotion-sn)
omap / <Plug>(easymotion-tn)
map n <Plug>(easymotion-next)
map N <Plug>(easymotion-prev)
let g:EasyMotion_landing_highlight = 0
2021-08-20 23:04:55 -07:00
'';
2021-08-21 00:37:33 -07:00
}
vinegar
undotree
2021-08-21 00:37:33 -07:00
{
plugin = vim-test;
config = ''
nmap <silent> <leader>t :TestNearest<CR>
nmap <silent> <leader>T :TestFile<CR>
nmap <silent> <leader>a :TestSuite<CR>
nmap <silent> <leader>l :TestLast<CR>
nmap <silent> <leader>g :TestVisit<CR>
let test#strategy = "neovim"
2021-08-20 23:04:55 -07:00
'';
2021-08-21 00:37:33 -07:00
}
{
plugin = ale;
config = ''
let g:ale_fix_on_save = 1
let g:ale_elixir_credo_strict = 1
let g:ale_fixers = {
\ 'javascript': ['prettier'],
\ 'javascript.jsx': ['prettier'],
\ 'javascriptreact': ['prettier'],
\ 'ruby': ['sorbet'],
\ 'rust': ['rustfmt'],
\}
let g:ale_linters_explicit = 1
2021-08-20 23:04:55 -07:00
'';
2021-08-21 00:37:33 -07:00
}
fzf-vim
fzfWrapper
2021-08-21 00:37:33 -07:00
{
plugin = nvim-compe;
config = ''
set completeopt=menuone,noselect
let g:compe = {}
let g:compe.enabled = v:true
let g:compe.autocomplete = v:true
let g:compe.debug = v:false
let g:compe.min_length = 1
let g:compe.preselect = 'enable'
let g:compe.throttle_time = 80
let g:compe.source_timeout = 200
let g:compe.resolve_timeout = 800
let g:compe.incomplete_delay = 400
let g:compe.max_abbr_width = 100
let g:compe.max_kind_width = 100
let g:compe.max_menu_width = 100
let g:compe.documentation = v:true
2021-08-20 23:04:55 -07:00
2021-08-21 00:37:33 -07:00
let g:compe.source = {}
let g:compe.source.path = v:true
let g:compe.source.buffer = v:true
let g:compe.source.calc = v:true
let g:compe.source.nvim_lsp = v:true
let g:compe.source.nvim_lua = v:true
let g:compe.source.vsnip = v:true
let g:compe.source.ultisnips = v:true
let g:compe.source.luasnip = v:true
let g:compe.source.emoji = v:true
2021-08-20 23:04:55 -07:00
'';
2021-08-21 00:37:33 -07:00
}
vim-goyo
2021-08-21 00:37:33 -07:00
{
plugin = nvim-lspconfig;
config = ''
lua << EOF
${readFile (
pkgs.substituteAll {
src = ./vim/nvim-lspconfig.lua;
# since both of these are used for actually configuring the system,
# we'll probably always want them around.
lua_ls = pkgs.sumneko-lua-language-server;
rnix_lsp = pkgs.rnix-lsp;
2021-08-20 23:04:55 -07:00
}
2021-08-21 00:37:33 -07:00
) }
EOF
2021-08-20 23:04:55 -07:00
'';
2021-08-21 00:37:33 -07:00
}
];
extraConfig = readFile ./vim/init.vim;
};
programs.tmux = {
enable = true;
tmuxinator = {
enable = true;
};
2020-02-10 14:14:58 -08:00
secureSocket = false;
};
programs.fzf = {
enable = true;
enableZshIntegration = true;
defaultCommand = "rg --no-ignore --follow --files --hidden --smart-case --glob \\\"!.git/*\\\"";
};
# services.lorri.enable = !pkgs.stdenv.isDarwin;
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
home.file.".tmux.conf" = {
source = ./tmux/tmux.conf;
};
2020-02-12 23:07:08 -08:00
home.file.".oh-my-zsh/custom/themes/typewritten.zsh-theme" = {
source = ./zsh/typewritten.zsh-theme;
2020-02-12 23:07:08 -08:00
};
}