this repo has no description

Giving ansible a go no

+177 -821
-12
.gitignore
··· 1 - *.swp 2 - **/*.swp 3 - **/*.cache 4 - *.cache 5 - .DS_Store 6 - **/.DS_Store 7 - irssi/away.log 8 - npm-debug.log 9 - irssi/config 10 - ctags 11 - wakatime.key 12 - nvim/.netrwhist
···
+3
Makefile
···
··· 1 + .PHONY: apply 2 + apply: 3 + ansible-playbook playbooks/main.yml -i hosts
+11 -2
README.md
··· 1 # dotfiles 2 3 - Just my personal configuration for some of my tools 4 5 - Keeping this README up to date with how often I change my setup is probably not feasible `¯\_(ツ)_/¯`
··· 1 # dotfiles 2 3 + Just my personal configuration for some of my tools, applied with ansible 4 + 5 + ## Pre-reqs 6 + 7 + - homebrew 8 + - ansible 9 + 10 + ## Installing 11 12 + ``` 13 + $ make apply 14 + ```
-57
broot.nix
··· 1 - { pkgs }: 2 - { 3 - enable = true; 4 - enableZshIntegration = true; 5 - modal = true; 6 - skin = { 7 - default = "rgb(101, 123, 131) rgb(253, 246, 227) / rgb(147, 161, 161) rgb(238, 232, 213)"; 8 - tree = "rgb(147, 161, 161) none"; 9 - file = "none none"; 10 - directory = "rgb(38, 139, 210) none bold"; 11 - exe = "rgb(211, 1, 2) none"; 12 - link = "rgb(211, 54, 130) none"; 13 - pruning = "rgb(147, 161, 161) none italic"; 14 - perm__ = "rgb(147, 161, 161) none"; 15 - perm_r = "none none"; 16 - perm_w = "none none"; 17 - perm_x = "none none"; 18 - owner = "rgb(147, 161, 161) none"; 19 - group = "rgb(147, 161, 161) none"; 20 - sparse = "none none"; 21 - git_branch = "rgb(88, 110, 117) none"; 22 - git_insertions = "rgb(133, 153, 0) none"; 23 - git_deletions = "rgb(211, 1, 2) none"; 24 - git_status_current = "none none"; 25 - git_status_modified = "rgb(181, 137, 0) none"; 26 - git_status_new = "rgb(133, 153, 0) none"; 27 - git_status_ignored = "rgb(147, 161, 161) none"; 28 - git_status_conflicted = "rgb(211, 1, 2) none"; 29 - git_status_other = "rgb(211, 1, 2) none"; 30 - selected_line = "none rgb(238, 232, 213)"; 31 - char_match = "rgb(133, 153, 0) none underlined"; 32 - file_error = "rgb(203, 75, 22) none italic"; 33 - flag_label = "none none"; 34 - flag_value = "rgb(181, 137, 0) none bold"; 35 - input = "none none"; 36 - status_error = "rgb(203, 75, 22) rgb(238, 232, 213)"; 37 - status_job = "rgb(108, 113, 196) rgb(238, 232, 213) bold"; 38 - status_normal = "none rgb(238, 232, 213)"; 39 - status_italic = "rgb(181, 137, 0) rgb(238, 232, 213)"; 40 - status_bold = "rgb(88, 110, 117) rgb(238, 232, 213) bold"; 41 - status_code = "rgb(108, 113, 196) rgb(238, 232, 213)"; 42 - status_ellipsis = "none rgb(238, 232, 213)"; 43 - scrollbar_track = "rgb(238, 232, 213) none"; 44 - scrollbar_thumb = "none none"; 45 - help_paragraph = "none none"; 46 - help_bold = "rgb(88, 110, 117) none bold"; 47 - help_italic = "rgb(88, 110, 117) none italic"; 48 - help_code = "rgb(88, 110, 117) rgb(238, 232, 213)"; 49 - help_headers = "rgb(181, 137, 0) none"; 50 - help_table_border = "none none"; 51 - preview_title = "rgb(147, 161, 161) rgb(238, 232, 213)"; 52 - preview = "rgb(101, 123, 131) rgb(253, 246, 227) / rgb(147, 161, 161) rgb(238, 232, 213)"; 53 - preview_line_number = "rgb(147, 161, 161) rgb(238, 232, 213)"; 54 - preview_match = "None ansi(29)"; 55 - staging_area_title = "gray(22) rgb(253, 246, 227)"; 56 - }; 57 - }
···
git/gitconfig gitconfig
git/gitignore gitignore
-74
home.nix
··· 1 - { config, pkgs, ... }: 2 - { 3 - # home-manager version 4 - home.stateVersion = "21.11"; 5 - 6 - home.username = "sethetter"; 7 - home.homeDirectory = "/Users/sethetter"; 8 - 9 - programs.home-manager.enable = true; 10 - programs.zsh = import ./zsh.nix { inherit pkgs; }; 11 - programs.neovim = import ./nvim/nvim.nix { inherit pkgs; }; 12 - programs.tmux = import ./tmux/tmux.nix { inherit pkgs; }; 13 - 14 - programs.git.enable = true; 15 - programs.gh.enable = true; 16 - programs.gpg.enable = true; 17 - 18 - programs.lazygit.enable = true; 19 - programs.lazygit.settings = { 20 - gui.theme = { lightTheme = true; }; 21 - }; 22 - 23 - programs.direnv = { 24 - enable = true; 25 - nix-direnv.enable = true; 26 - nix-direnv.enableFlakes = true; 27 - }; 28 - 29 - programs.bat = { 30 - enable = true; 31 - config = { theme = "Solarized (light)"; }; 32 - }; 33 - 34 - programs.broot = import ./broot.nix { inherit pkgs; }; 35 - 36 - programs.fzf = { 37 - enable = true; 38 - enableZshIntegration = true; 39 - }; 40 - 41 - home.sessionVariables = { 42 - EDITOR = "nvim"; 43 - ZSH_DISABLE_COMPFIX = "true"; 44 - }; 45 - 46 - home.packages = [ 47 - pkgs.direnv 48 - pkgs.fd 49 - pkgs.ripgrep 50 - pkgs.nmap 51 - pkgs.delta # TODO: configure as part of programs.git 52 - pkgs.wget 53 - pkgs.curl 54 - 55 - # Non-free, or don't work on MacOS 56 - # ---------------- 57 - # pkgs.firefox 58 - # pkgs.obsidian 59 - # pkgs.slack 60 - # pkgs.signal-desktop 61 - ]; 62 - 63 - home.file = { 64 - # TODO: Use programs.git config instead 65 - ".gitconfig".source = config.lib.file.mkOutOfStoreSymlink ./git/gitconfig; 66 - ".gitignore".source = config.lib.file.mkOutOfStoreSymlink ./git/gitignore; 67 - 68 - # ".vifm/colors/solarized-light".source = config.lib.file.mkOutOfStoreSymlink ./vifm/solarized-light.vifm; 69 - # ".vifm/vifmrc".source = config.lib.file.mkOutOfStoreSymlink ./vifm/vifmrc; 70 - }; 71 - 72 - # TODO: obsidian config 73 - # TODO: font-iosevka-nerd-font (not available I think, could script download though?) 74 - }
···
+1
hosts
···
··· 1 + localhost ansible_connection=local
-381
iterm.json
··· 1 - { 2 - "Use Non-ASCII Font" : false, 3 - "Tags" : [ 4 - 5 - ], 6 - "Ansi 12 Color" : { 7 - "Red Component" : 0.51372549019607838, 8 - "Color Space" : "sRGB", 9 - "Blue Component" : 0.58823529411764708, 10 - "Green Component" : 0.58039215686274515 11 - }, 12 - "Ansi 6 Color" : { 13 - "Red Component" : 0.16470588235294117, 14 - "Color Space" : "sRGB", 15 - "Blue Component" : 0.59607843137254901, 16 - "Green Component" : 0.63137254901960782 17 - }, 18 - "Normal Font" : "Iosevka-Fixed-SS14 15", 19 - "Bold Color" : { 20 - "Red Component" : 0.34509803921568627, 21 - "Color Space" : "sRGB", 22 - "Blue Component" : 0.45882352941176469, 23 - "Green Component" : 0.43137254901960786 24 - }, 25 - "Link Color" : { 26 - "Red Component" : 0, 27 - "Color Space" : "sRGB", 28 - "Blue Component" : 0.73423302173614502, 29 - "Alpha Component" : 1, 30 - "Green Component" : 0.35916060209274292 31 - }, 32 - "Ansi 1 Color" : { 33 - "Red Component" : 0.86274509803921573, 34 - "Color Space" : "sRGB", 35 - "Blue Component" : 0.18431372549019609, 36 - "Green Component" : 0.19607843137254902 37 - }, 38 - "Guid" : "6B8947DC-65E0-4A44-A6DE-B38305B2F452", 39 - "Rows" : 30, 40 - "Default Bookmark" : "No", 41 - "Cursor Guide Color" : { 42 - "Red Component" : 0.70213186740875244, 43 - "Color Space" : "sRGB", 44 - "Blue Component" : 1, 45 - "Alpha Component" : 0.25, 46 - "Green Component" : 0.9268307089805603 47 - }, 48 - "Non-ASCII Anti Aliased" : true, 49 - "Use Bright Bold" : true, 50 - "Ansi 10 Color" : { 51 - "Red Component" : 0.34509803921568627, 52 - "Color Space" : "sRGB", 53 - "Blue Component" : 0.45882352941176469, 54 - "Green Component" : 0.43137254901960786 55 - }, 56 - "Ambiguous Double Width" : false, 57 - "Jobs to Ignore" : [ 58 - "rlogin", 59 - "ssh", 60 - "slogin", 61 - "telnet" 62 - ], 63 - "Ansi 15 Color" : { 64 - "Red Component" : 0.99215686274509807, 65 - "Color Space" : "sRGB", 66 - "Blue Component" : 0.8901960784313725, 67 - "Green Component" : 0.96470588235294119 68 - }, 69 - "Foreground Color" : { 70 - "Red Component" : 0.396078431372549, 71 - "Color Space" : "sRGB", 72 - "Blue Component" : 0.51372549019607838, 73 - "Green Component" : 0.4823529411764706 74 - }, 75 - "Working Directory" : "\/Users\/sethetter", 76 - "Blinking Cursor" : false, 77 - "Disable Window Resizing" : true, 78 - "Sync Title" : false, 79 - "Prompt Before Closing 2" : false, 80 - "BM Growl" : false, 81 - "Command" : "", 82 - "Description" : "Default", 83 - "Space" : 0, 84 - "Mouse Reporting" : true, 85 - "Screen" : 0, 86 - "Selection Color" : { 87 - "Red Component" : 0.93333333333333335, 88 - "Color Space" : "sRGB", 89 - "Blue Component" : 0.83529411764705885, 90 - "Green Component" : 0.90980392156862744 91 - }, 92 - "Initial Use Transparency" : false, 93 - "Columns" : 150, 94 - "Idle Code" : 0, 95 - "Ansi 13 Color" : { 96 - "Red Component" : 0.42352941176470588, 97 - "Color Space" : "sRGB", 98 - "Blue Component" : 0.7686274509803922, 99 - "Green Component" : 0.44313725490196076 100 - }, 101 - "Custom Command" : "No", 102 - "ASCII Anti Aliased" : true, 103 - "Non Ascii Font" : "Monaco 12", 104 - "Vertical Spacing" : 1, 105 - "Use Bold Font" : true, 106 - "Option Key Sends" : 0, 107 - "Selected Text Color" : { 108 - "Red Component" : 0.34509803921568627, 109 - "Color Space" : "sRGB", 110 - "Blue Component" : 0.45882352941176469, 111 - "Green Component" : 0.43137254901960786 112 - }, 113 - "Background Color" : { 114 - "Red Component" : 0.99215686274509807, 115 - "Color Space" : "sRGB", 116 - "Blue Component" : 0.8901960784313725, 117 - "Green Component" : 0.96470588235294119 118 - }, 119 - "Character Encoding" : 4, 120 - "Ansi 11 Color" : { 121 - "Red Component" : 0.396078431372549, 122 - "Color Space" : "sRGB", 123 - "Blue Component" : 0.51372549019607838, 124 - "Green Component" : 0.4823529411764706 125 - }, 126 - "Thin Strokes" : 0, 127 - "Use Italic Font" : true, 128 - "Unlimited Scrollback" : false, 129 - "Keyboard Map" : { 130 - "0xf700-0x260000" : { 131 - "Action" : 10, 132 - "Text" : "[1;6A" 133 - }, 134 - "0x37-0x40000" : { 135 - "Action" : 11, 136 - "Text" : "0x1f" 137 - }, 138 - "0x32-0x40000" : { 139 - "Action" : 11, 140 - "Text" : "0x00" 141 - }, 142 - "0xf709-0x20000" : { 143 - "Action" : 10, 144 - "Text" : "[17;2~" 145 - }, 146 - "0xf70c-0x20000" : { 147 - "Action" : 10, 148 - "Text" : "[20;2~" 149 - }, 150 - "0xf729-0x20000" : { 151 - "Action" : 10, 152 - "Text" : "[1;2H" 153 - }, 154 - "0xf72b-0x40000" : { 155 - "Action" : 10, 156 - "Text" : "[1;5F" 157 - }, 158 - "0xf705-0x20000" : { 159 - "Action" : 10, 160 - "Text" : "[1;2Q" 161 - }, 162 - "0xf703-0x260000" : { 163 - "Action" : 10, 164 - "Text" : "[1;6C" 165 - }, 166 - "0xf700-0x220000" : { 167 - "Action" : 10, 168 - "Text" : "[1;2A" 169 - }, 170 - "0xf701-0x280000" : { 171 - "Action" : 11, 172 - "Text" : "0x1b 0x1b 0x5b 0x42" 173 - }, 174 - "0x38-0x40000" : { 175 - "Action" : 11, 176 - "Text" : "0x7f" 177 - }, 178 - "0x33-0x40000" : { 179 - "Action" : 11, 180 - "Text" : "0x1b" 181 - }, 182 - "0xf703-0x220000" : { 183 - "Action" : 10, 184 - "Text" : "[1;2C" 185 - }, 186 - "0xf701-0x240000" : { 187 - "Action" : 10, 188 - "Text" : "[1;5B" 189 - }, 190 - "0xf70d-0x20000" : { 191 - "Action" : 10, 192 - "Text" : "[21;2~" 193 - }, 194 - "0xf702-0x260000" : { 195 - "Action" : 10, 196 - "Text" : "[1;6D" 197 - }, 198 - "0xf729-0x40000" : { 199 - "Action" : 10, 200 - "Text" : "[1;5H" 201 - }, 202 - "0xf706-0x20000" : { 203 - "Action" : 10, 204 - "Text" : "[1;2R" 205 - }, 206 - "0x34-0x40000" : { 207 - "Action" : 11, 208 - "Text" : "0x1c" 209 - }, 210 - "0xf700-0x280000" : { 211 - "Action" : 11, 212 - "Text" : "0x1b 0x1b 0x5b 0x41" 213 - }, 214 - "0x2d-0x40000" : { 215 - "Action" : 11, 216 - "Text" : "0x1f" 217 - }, 218 - "0xf70e-0x20000" : { 219 - "Action" : 10, 220 - "Text" : "[23;2~" 221 - }, 222 - "0xf702-0x220000" : { 223 - "Action" : 10, 224 - "Text" : "[1;2D" 225 - }, 226 - "0xf703-0x280000" : { 227 - "Action" : 11, 228 - "Text" : "0x1b 0x1b 0x5b 0x43" 229 - }, 230 - "0xf700-0x240000" : { 231 - "Action" : 10, 232 - "Text" : "[1;5A" 233 - }, 234 - "0xf707-0x20000" : { 235 - "Action" : 10, 236 - "Text" : "[1;2S" 237 - }, 238 - "0xf70a-0x20000" : { 239 - "Action" : 10, 240 - "Text" : "[18;2~" 241 - }, 242 - "0x35-0x40000" : { 243 - "Action" : 11, 244 - "Text" : "0x1d" 245 - }, 246 - "0xf70f-0x20000" : { 247 - "Action" : 10, 248 - "Text" : "[24;2~" 249 - }, 250 - "0xf703-0x240000" : { 251 - "Action" : 10, 252 - "Text" : "[1;5C" 253 - }, 254 - "0xf701-0x260000" : { 255 - "Action" : 10, 256 - "Text" : "[1;6B" 257 - }, 258 - "0xf702-0x280000" : { 259 - "Action" : 11, 260 - "Text" : "0x1b 0x1b 0x5b 0x44" 261 - }, 262 - "0xf72b-0x20000" : { 263 - "Action" : 10, 264 - "Text" : "[1;2F" 265 - }, 266 - "0x36-0x40000" : { 267 - "Action" : 11, 268 - "Text" : "0x1e" 269 - }, 270 - "0xf708-0x20000" : { 271 - "Action" : 10, 272 - "Text" : "[15;2~" 273 - }, 274 - "0xf701-0x220000" : { 275 - "Action" : 10, 276 - "Text" : "[1;2B" 277 - }, 278 - "0xf70b-0x20000" : { 279 - "Action" : 10, 280 - "Text" : "[19;2~" 281 - }, 282 - "0xf702-0x240000" : { 283 - "Action" : 10, 284 - "Text" : "[1;5D" 285 - }, 286 - "0xf704-0x20000" : { 287 - "Action" : 10, 288 - "Text" : "[1;2P" 289 - } 290 - }, 291 - "Window Type" : 0, 292 - "Background Image Location" : "", 293 - "Blur" : false, 294 - "Badge Color" : { 295 - "Red Component" : 1, 296 - "Color Space" : "sRGB", 297 - "Blue Component" : 0, 298 - "Alpha Component" : 0.5, 299 - "Green Component" : 0.1491314172744751 300 - }, 301 - "Scrollback Lines" : 1000, 302 - "Send Code When Idle" : false, 303 - "Close Sessions On End" : true, 304 - "Terminal Type" : "xterm-256color", 305 - "Visual Bell" : false, 306 - "Flashing Bell" : false, 307 - "Silence Bell" : true, 308 - "Ansi 14 Color" : { 309 - "Red Component" : 0.57647058823529407, 310 - "Color Space" : "sRGB", 311 - "Blue Component" : 0.63137254901960782, 312 - "Green Component" : 0.63137254901960782 313 - }, 314 - "ASCII Ligatures" : false, 315 - "Name" : "Default", 316 - "Cursor Text Color" : { 317 - "Red Component" : 0.93333333333333335, 318 - "Color Space" : "sRGB", 319 - "Blue Component" : 0.83529411764705885, 320 - "Green Component" : 0.90980392156862744 321 - }, 322 - "Shortcut" : "", 323 - "Cursor Color" : { 324 - "Red Component" : 0.396078431372549, 325 - "Color Space" : "sRGB", 326 - "Blue Component" : 0.51372549019607838, 327 - "Green Component" : 0.4823529411764706 328 - }, 329 - "Transparency" : 0, 330 - "Ansi 0 Color" : { 331 - "Red Component" : 0.027450980392156862, 332 - "Color Space" : "sRGB", 333 - "Blue Component" : 0.25882352941176473, 334 - "Green Component" : 0.21176470588235294 335 - }, 336 - "Horizontal Spacing" : 0.87, 337 - "Ansi 3 Color" : { 338 - "Red Component" : 0.70980392156862748, 339 - "Color Space" : "sRGB", 340 - "Blue Component" : 0, 341 - "Green Component" : 0.53725490196078429 342 - }, 343 - "Ansi 2 Color" : { 344 - "Red Component" : 0.52156862745098043, 345 - "Color Space" : "sRGB", 346 - "Blue Component" : 0, 347 - "Green Component" : 0.59999999999999998 348 - }, 349 - "Right Option Key Sends" : 0, 350 - "Custom Directory" : "No", 351 - "Ansi 7 Color" : { 352 - "Red Component" : 0.93333333333333335, 353 - "Color Space" : "sRGB", 354 - "Blue Component" : 0.83529411764705885, 355 - "Green Component" : 0.90980392156862744 356 - }, 357 - "Ansi 8 Color" : { 358 - "Red Component" : 0, 359 - "Color Space" : "sRGB", 360 - "Blue Component" : 0.21176470588235294, 361 - "Green Component" : 0.16862745098039217 362 - }, 363 - "Ansi 9 Color" : { 364 - "Red Component" : 0.79607843137254897, 365 - "Color Space" : "sRGB", 366 - "Blue Component" : 0.086274509803921567, 367 - "Green Component" : 0.29411764705882354 368 - }, 369 - "Ansi 4 Color" : { 370 - "Red Component" : 0.14901960784313725, 371 - "Color Space" : "sRGB", 372 - "Blue Component" : 0.82352941176470584, 373 - "Green Component" : 0.54509803921568623 374 - }, 375 - "Ansi 5 Color" : { 376 - "Red Component" : 0.82745098039215681, 377 - "Color Space" : "sRGB", 378 - "Blue Component" : 0.50980392156862742, 379 - "Green Component" : 0.21176470588235294 380 - } 381 - }
···
-180
nvim/init.vim
··· 1 - lua << EOF 2 - vim.cmd("let mapleader=' '") 3 - 4 - vim.cmd('set relativenumber') 5 - vim.cmd('set number') 6 - 7 - vim.cmd('set encoding=utf-8') 8 - vim.cmd('set fileencoding=utf-8') 9 - vim.cmd('set fileencodings=utf-8') 10 - 11 - vim.cmd('set bomb') 12 - vim.cmd('set binary') 13 - vim.cmd('set ttyfast') 14 - vim.cmd('set backspace=indent,eol,start') 15 - vim.cmd('set hidden') 16 - 17 - vim.cmd('set tabstop=2') 18 - vim.cmd('set softtabstop=2') 19 - vim.cmd('set shiftwidth=2') 20 - vim.cmd('set expandtab') 21 - vim.cmd('set nowrap') 22 - 23 - -- Searching 24 - vim.cmd('set hlsearch') 25 - vim.cmd('set incsearch') 26 - vim.cmd('set ignorecase') 27 - vim.cmd('set smartcase') 28 - 29 - -- Colors 30 - require('lualine').setup({ 31 - options = { 32 - theme = 'solarized_light', 33 - section_separators = {'', ''}, 34 - component_separators = {'', ''} 35 - } 36 - }) 37 - 38 - vim.cmd('set termguicolors') 39 - vim.cmd('syntax enable') 40 - vim.cmd('set background=light') 41 - vim.cmd('colorscheme solarized') 42 - 43 - -- Filetypes 44 - vim.cmd('au BufEnter *.nix :set ft=nix') 45 - vim.cmd('au BufEnter *.graphql :set ft=graphql') 46 - 47 - -- Keybindings 48 - local nvim_lsp = require('lspconfig') 49 - 50 - local function set_keymap(...) vim.api.nvim_set_keymap(...) end 51 - local opts = { noremap=true, silent=true } 52 - 53 - vim.api.nvim_set_keymap('n', ';', ':', opts) 54 - 55 - -- Files 56 - set_keymap('n', '<leader>fs', ':w<CR>', opts) 57 - set_keymap('n', '<leader>fN', ':new<CR>', opts) 58 - set_keymap('n', '<leader>fn', ':vnew<CR>', opts) 59 - set_keymap('n', '<leader>fr', ':e<CR>', opts) 60 - set_keymap('n', '<leader>fR', ':e!<CR>', opts) 61 - set_keymap('n', '<leader>fe', ':e .<CR>', opts) 62 - 63 - -- Windows / Buffers / Tabs 64 - set_keymap('n', '<leader>wd', ':q<CR>', opts) 65 - set_keymap('n', '<leader>w/', ':vsp<CR>', opts) 66 - set_keymap('n', '<leader>w?', ':sp<CR>', opts) 67 - set_keymap('n', '<leader>wh', '<C-w>h', opts) 68 - set_keymap('n', '<leader>wj', '<C-w>j', opts) 69 - set_keymap('n', '<leader>wk', '<C-w>k', opts) 70 - set_keymap('n', '<leader>wl', '<C-w>l', opts) 71 - set_keymap('n', '<leader>bd', ':bd<CR>', opts) 72 - set_keymap('n', '<leader>BX', ':bufdo bd<CR>', opts) 73 - -- set_keymap('n', '<leader>bD', ':BuffersDelete<CR>', opts) 74 - set_keymap('n', '<leader>bn', ':bn<CR>', opts) 75 - set_keymap('n', '<leader>bp', ':bp<CR>', opts) 76 - set_keymap('n', '<leader>T', ':tabnew<CR>', opts) 77 - set_keymap('n', '<leader>tn', ':tabnext<CR>', opts) 78 - set_keymap('n', '<leader>tp', ':tabprevious<CR>', opts) 79 - set_keymap('n', '<leader>td', ':tabclose<CR>', opts) 80 - -- set_keymap('n', '<leader>C', ':Commands<CR>', opts) 81 - 82 - -- Movement 83 - set_keymap('', '<C-L>', '20zl', opts) -- Scroll 20 characters to the right 84 - set_keymap('', '<C-H>', '20zh', opts) -- Scroll 20 characters to the left 85 - 86 - -- Vmap for maintain Visual Mode after shifting > and < 87 - set_keymap('v', '<', '<gv', opts) 88 - set_keymap('v', '>', '>gv', opts) 89 - set_keymap('n', '<', '<<', opts) 90 - set_keymap('n', '>', '>>', opts) 91 - 92 - -- Move visual block 93 - set_keymap('v', 'J', ":m '>+1<CR>gv=gv", opts) 94 - set_keymap('v', 'K', ":m '<-2<CR>gv=gv", opts) 95 - 96 - -- Quickfix List 97 - set_keymap('n', '<leader>qo', ':copen<CR>', opts) 98 - set_keymap('n', '<leader>qv', ':vert copen<CR><C-w>=', opts) 99 - set_keymap('n', '<leader>qc', ':cclose<CR>', opts) 100 - set_keymap('n', '<leader>qn', ':cnext<CR>', opts) 101 - set_keymap('n', '<leader>qp', ':cprev<CR>', opts) 102 - 103 - -- Location List 104 - set_keymap('n', '<leader>lo', ':lopen<CR>', opts) 105 - set_keymap('n', '<leader>lv', ':vert lopen<CR><C-w>=', opts) 106 - set_keymap('n', '<leader>lc', ':lclose<CR>', opts) 107 - set_keymap('n', '<leader>ln', ':lnext<CR>', opts) 108 - set_keymap('n', '<leader>lp', ':lprev<CR>', opts) 109 - 110 - -- Project Navigation 111 - set_keymap('n', '<leader>pt', ':NvimTreeToggle<CR>', opts) 112 - set_keymap('n', '<leader>pf', ":lua require('telescope.builtin').find_files()<CR>", opts) 113 - set_keymap('n', '<leader>pb', ":lua require('telescope.builtin').buffers()<CR>", opts) 114 - set_keymap('n', '<leader>ps', ":lua require('telescope.builtin').live_grep()<CR>", opts) 115 - 116 - -- LSP 117 - set_keymap('n', 'gd', ":lua require('telescope.builtin').lsp_definitions()<CR>", opts) 118 - set_keymap('n', 'gr', ":lua require('telescope.builtin').lsp_references()<CR>", opts) 119 - set_keymap('n', '<leader>fo', ":lua require('telescope.builtin').lsp_document_symbols()<CR>", opts) 120 - set_keymap('n', '<leader>po', ":lua require('telescope.builtin').lsp_dynamic_workspace_symbols()<CR>", opts) 121 - 122 - -- Git 123 - set_keymap('n', '<leader>gs', ":lua require('telescope.builtin').git_status()<CR>", opts) 124 - set_keymap('n', '<leader>gc', ":lua require('telescope.builtin').git_commits()<CR>", opts) 125 - 126 - -- Misc 127 - set_keymap('', '<leader>c', ':CommentToggle<CR>', opts) 128 - set_keymap('n', '<leader>sc', ':let @/=""<CR>', opts) 129 - 130 - -- Autocomplete 131 - -- set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true}) 132 - -- set_keymap("s", "<Tab>", "v:lua.tab_complete()", {expr = true}) 133 - -- set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true}) 134 - -- set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true}) 135 - 136 - --This line is important for auto-import 137 - -- set_keymap("i", "<C-y>", "compe#confirm('<C-y>')", {expr = true}) 138 - -- set_keymap("i", "<CR>", "<C-y>", {}) 139 - -- set_keymap('i', '<cr>', '<cmd>compe#confirm()', { expr = true }) 140 - -- set_keymap('i', '<c-space>', '<cmd>compe#complete()', { expr = true }) 141 - 142 - -- LSP 143 - 144 - -- Use an on_attach function to only map the following keys 145 - -- after the language server attaches to the current buffer 146 - local on_attach = function(client, bufnr) 147 - local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end 148 - local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end 149 - 150 - buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') 151 - -- TODO: Open file outline/search symbols 152 - -- TODO: Search workspace symbols? 153 - 154 - buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts) 155 - -- buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts) 156 - -- buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts) 157 - buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts) 158 - buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts) 159 - buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts) 160 - -- buf_set_keymap('n', '<leader>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts) 161 - -- buf_set_keymap('n', '<leader>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts) 162 - -- buf_set_keymap('n', '<leader>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts) 163 - buf_set_keymap('n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts) 164 - buf_set_keymap('n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts) 165 - buf_set_keymap('n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts) 166 - buf_set_keymap('n', '<leader>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts) 167 - buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts) 168 - buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts) 169 - buf_set_keymap('n', '<leader>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts) 170 - buf_set_keymap('n', '<leader>ff', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts) 171 - end 172 - 173 - local servers = {'gopls', 'terraformls', 'solargraph', 'rls', 'tsserver', 'hls', 'rnix', 'graphql'} 174 - for _, lsp in ipairs(servers) do 175 - nvim_lsp[lsp].setup { 176 - on_attach = on_attach, 177 - flags = { debounce_text_changes = 150 }, 178 - } 179 - end 180 - EOF
···
-47
nvim/nvim.nix
··· 1 - { pkgs }: 2 - let 3 - nvim-solarized-lua = pkgs.vimUtils.buildVimPlugin { 4 - name = "nvim-solarized-lua"; 5 - src = pkgs.fetchgit { 6 - url = "https://github.com/ishan9299/nvim-solarized-lua"; 7 - sha256 = "032gs63g3x62mym6nhznvywsqk1cxsgwx0fv2vyh2c929fb27ji7"; 8 - }; 9 - meta.homepage = "https://github.com/ishan9299/nvim-solarized-lua"; 10 - }; 11 - 12 - nvim-comment = pkgs.vimUtils.buildVimPlugin { 13 - name = "nvim-comment"; 14 - src = pkgs.fetchgit { 15 - url = "https://github.com/terrortylor/nvim-comment"; 16 - sha256 = "039fznaldf6lzk0yp51wi7p1j3l5rvhwryvk5s3lrq78lxq2rzn2"; 17 - }; 18 - buildPhase = "# skip the makefile"; 19 - meta.homepage = "https://github.com//terrortylor/nvim-comment"; 20 - }; 21 - in 22 - { 23 - enable = true; 24 - viAlias = true; 25 - plugins = with pkgs.vimPlugins; [ 26 - { 27 - plugin = gitsigns-nvim; 28 - config = "lua require('gitsigns').setup()"; 29 - } 30 - # { plugin = "hrsh7th/nvim-compe"; } 31 - { plugin = nvim-treesitter; } 32 - { plugin = telescope-nvim; } 33 - { 34 - plugin = nvim-comment; 35 - config = "lua require('nvim_comment').setup()"; 36 - } 37 - { plugin = vim-closer; } 38 - { plugin = nvim-tree-lua; } 39 - { plugin = nvim-web-devicons; } 40 - { plugin = nvim-solarized-lua; } 41 - { plugin = lualine-nvim; } 42 - { plugin = nvim-lspconfig; } 43 - { plugin = vim-nix; } 44 - ]; 45 - 46 - extraConfig = (builtins.readFile ./init.vim); 47 - }
···
+106
playbooks/main.yml
···
··· 1 + --- 2 + - hosts: all 3 + vars: 4 + home_dir: /Users/sethetter 5 + dotfiles_dir: "{{ home_dir }}/dotfiles" 6 + vscode_dir: "{{ home_dir }}/Library/Application Support/Code/User" 7 + obsidian_dir: "{{ home_dir }}/obsidian" 8 + 9 + tasks: 10 + - name: Install homebrew libraries 11 + homebrew: name={{ item }} state=present 12 + with_items: 13 + - zsh 14 + - direnv 15 + - vim 16 + - tmux 17 + - git 18 + - gh 19 + - gnupg 20 + - volta 21 + - tfenv 22 + - ripgrep 23 + - curl 24 + - wget 25 + - fzf 26 + # - font-iosevka-nerd-font 27 + 28 + - name: Link tmux.conf 29 + ansible.builtin.file: 30 + src: "{{ dotfiles_dir }}/tmux.conf" 31 + dest: "{{ home_dir }}/.tmux.conf" 32 + state: link 33 + 34 + - name: Install tpm 35 + ansible.builtin.git: 36 + repo: "https://github.com/tmux-plugins/tpm" 37 + dest: "{{ home_dir }}/.tmux/plugins/tpm" 38 + 39 + - name: Link zshrc 40 + ansible.builtin.file: 41 + src: "{{ dotfiles_dir }}/zshrc" 42 + dest: "{{ home_dir }}/.zshrc" 43 + state: link 44 + 45 + - name: Check for oh-my-zsh 46 + ansible.builtin.shell: "ls {{ home_dir }}/.oh-my-zsh" 47 + ignore_errors: true 48 + register: ohmyzsh_check 49 + 50 + - name: Install oh-my-zsh 51 + ansible.builtin.shell: sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" 52 + when: ohmyzsh_check.stdout.find('oh-my-zsh.sh') == -1 53 + 54 + - name: Link gitconfig 55 + ansible.builtin.file: 56 + src: "{{ dotfiles_dir }}/gitconfig" 57 + dest: "{{ home_dir }}/.gitconfig" 58 + state: link 59 + 60 + - name: Link gitignore 61 + ansible.builtin.file: 62 + src: "{{ dotfiles_dir }}/gitignore" 63 + dest: "{{ home_dir }}/.gitignore" 64 + state: link 65 + 66 + - name: Link vscode/settings.json 67 + ansible.builtin.file: 68 + src: "{{ dotfiles_dir }}/code/settings.json" 69 + dest: "{{ vscode_dir }}/settings.json" 70 + state: link 71 + 72 + - name: Link vscode/keybindings.json 73 + ansible.builtin.file: 74 + src: "{{ dotfiles_dir }}/code/keybindings.json" 75 + dest: "{{ vscode_dir }}/keybindings.json" 76 + state: link 77 + 78 + - name: Get obsidian configs 79 + ansible.builtin.shell: "ls {{ dotfiles_dir }}/obsidian/" 80 + register: obsidian_configs 81 + 82 + - name: Check for obsidian personal 83 + stat: 84 + path: "{{ obsidian_dir }}/personal" 85 + register: obsidian_personal_dir 86 + 87 + - name: Link obsidian configs (personal) 88 + ansible.builtin.file: 89 + src: "{{ dotfiles_dir }}/obsidian/{{ item }}" 90 + dest: "{{ obsidian_dir }}/personal/.obsidian/{{ item }}" 91 + state: link 92 + with_items: "{{ obsidian_configs.stdout_lines }}" 93 + when: obsidian_personal_dir.stat.exists 94 + 95 + - name: Check for obsidian work 96 + stat: 97 + path: "{{ obsidian_dir }}/work" 98 + register: obsidian_work_dir 99 + 100 + - name: Link obsidian configs (work) 101 + ansible.builtin.file: 102 + src: "{{ dotfiles_dir }}/obsidian/{{ item }}" 103 + dest: "{{ obsidian_dir }}/work/.obsidian/{{ item }}" 104 + state: link 105 + with_items: "{{ obsidian_configs.stdout_lines }}" 106 + when: obsidian_work_dir.stat.exists
+22 -1
tmux/tmux.conf tmux.conf
··· 1 # Pane movement 2 bind h select-pane -L 3 bind j select-pane -D ··· 41 set -g status-justify centre 42 set -g status-left-length 40 43 set -g status-left ' #(if [ "$SSH_CONNECTION" ] then echo "☎ | "; fi)#[fg=green]#S #[default]#I:#P #[default]' 44 - set -g status-right '#[fg=green]#H #[default]| #[fg=green]%m/%d/%y #[default]| #[fg=green]%I:%M '
··· 1 + # Set prefix to C-a 2 + unbind C-b 3 + set-option -g prefix C-a 4 + 5 + set -g default-terminal "xterm-256color" 6 + set -g base-index 1 7 + setw -g pane-base-index 1 8 + 9 + # tpm plugins 10 + set -g @plugin 'tmux-plugins/tpm' 11 + set -g @plugin 'seebi/tmux-colors-solarized' 12 + set -g @plugin 'tmux-plugins/tmux-sensible' 13 + set -g @plugin 'tmux-plugins/tmux-copycat' 14 + set -g @plugin 'sainnhe/tmux-fzf' 15 + set -g @plugin 'wfxr/tmux-fzf-url' 16 + set -g @plugin 'tmux-plugins/tmux-sessionist' 17 + 18 + set -g @colors-solarized 'light' 19 + 20 + run '~/.tmux/plugins/tpm/tpm' 21 + 22 # Pane movement 23 bind h select-pane -L 24 bind j select-pane -D ··· 62 set -g status-justify centre 63 set -g status-left-length 40 64 set -g status-left ' #(if [ "$SSH_CONNECTION" ] then echo "☎ | "; fi)#[fg=green]#S #[default]#I:#P #[default]' 65 + set -g status-right '#[fg=green]#H #[default]| #[fg=green]%m/%d/%y #[default]| #[fg=green]%I:%M '
-22
tmux/tmux.nix
··· 1 - { pkgs }: 2 - { 3 - enable = true; 4 - prefix = "C-a"; 5 - baseIndex = 1; 6 - terminal = "xterm-256color"; 7 - extraConfig = (builtins.readFile ./tmux.conf); 8 - plugins = with pkgs.tmuxPlugins; [ 9 - { 10 - plugin = tmux-colors-solarized; 11 - extraConfig = '' 12 - set-option -ga terminal-overrides ",xterm-256color:Tc" 13 - set -g @colors-solarized 'light' 14 - ''; 15 - } 16 - copycat 17 - sensible 18 - tmux-fzf 19 - fzf-tmux-url 20 - sessionist 21 - ]; 22 - }
···
-45
zsh.nix
··· 1 - { pkgs }: 2 - { 3 - enable = true; 4 - enableSyntaxHighlighting = true; 5 - enableCompletion = true; 6 - enableAutosuggestions = true; 7 - initExtraFirst = '' 8 - alias gdc="git diff --cached" 9 - alias tma="tmux a" 10 - alias dc="docker compose" 11 - alias hmb="home-manager build" 12 - alias hms="home-manager switch" 13 - alias lg="lazygit" 14 - 15 - function tm { 16 - rootdir=$(pwd) 17 - if [ ! -z "$1" ]; then 18 - rootdir=$1 19 - fi 20 - cd $rootdir 21 - tmux new-session -A -s "''${rootdir##*/}" 22 - } 23 - 24 - function mdp() { 25 - # Requires Markdown Viewer extension 26 - # - https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk?hl=en 27 - open -a '/Applications/Google Chrome.app' $1 28 - } 29 - 30 - . /Users/sethetter/.nix-profile/etc/profile.d/nix.sh 31 - ''; 32 - localVariables = { 33 - EDITOR = "nvim"; 34 - }; 35 - 36 - oh-my-zsh = { 37 - enable = true; 38 - theme = "robbyrussell"; 39 - plugins = [ 40 - "git" 41 - "vi-mode" 42 - # TODO: some way to know i'm in a nix shell? Maybe this? 43 - ]; 44 - }; 45 - }
···
+34
zshrc
···
··· 1 + # zsh being installed via homebrew leads to some directories used for autocomplete 2 + # being considered insecure by zsh, this disables that check since we trust homebrew 3 + export ZSH_DISABLE_COMPFIX=true 4 + export EDITOR=vim 5 + 6 + export VOLTA_HOME=$HOME/.volta 7 + export PATH=$VOLTA_HOME/bin:$PATH 8 + 9 + plugins=(git vi-mode fzf) 10 + 11 + ZSH_THEME="robbyrussell" 12 + source $ZSH/oh-my-zsh.sh 13 + 14 + alias gdc="git diff --cached" 15 + alias tma="tmux a" 16 + alias dc="docker compose" 17 + alias hmb="home-manager build" 18 + alias hms="home-manager switch" 19 + alias lg="lazygit" 20 + 21 + function tm { 22 + rootdir=$(pwd) 23 + if [ ! -z "$1" ]; then 24 + rootdir=$1 25 + fi 26 + cd $rootdir 27 + tmux new-session -A -s "${rootdir##*/}" 28 + } 29 + 30 + function mdp() { 31 + # Requires Markdown Viewer extension 32 + # - https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk?hl=en 33 + open -a '/Applications/Google Chrome.app' $1 34 + }