diff --git a/modules/home-manager/common/all-cli.nix b/modules/home-manager/common/all-cli.nix index c5ae93f..4b4da69 100644 --- a/modules/home-manager/common/all-cli.nix +++ b/modules/home-manager/common/all-cli.nix @@ -1,14 +1,24 @@ -{ pkgs, genebean-omp-themes, ... }: { +{ pkgs, genebean-omp-themes, ... }: let + sqlite_lib = if builtins.elem pkgs.system [ + "aarch64-darwin" + "x86_64-darwin" + ] + then "libsqlite3.dylib" + else "libsqlite3.so"; +in { home.packages = with pkgs; [ cargo + cheat colordiff dogdns dos2unix du-dust + duf fd git-filter-repo gotop htop + httpie hub jq lazygit @@ -65,6 +75,8 @@ }; }; }; + bottom.enable = true; + broot.enable = true; eza.enable = true; gh.enable = true; git = { @@ -90,15 +102,22 @@ jq.enable = true; neovim = { enable = true; - defaultEditor = false; + defaultEditor = true; extraLuaConfig = '' local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" vim.opt.rtp:prepend(lazypath) require("config.keymaps") require("lazy").setup("plugins") + + vim.g.sqlite_clib_path = '${pkgs.sqlite.out}/lib/${sqlite_lib}' + -- NOTE: This will get the OS from Lua: + -- print(vim.loop.os_uname().sysname) ''; - extraPackages = [ pkgs.gcc ]; # needed so treesitter can do compiling + extraPackages = with pkgs; [ + gcc # needed so treesitter can do compiling + sqlite # needed by sqlite.lua used by telescope-cheat + ]; plugins = [ pkgs.vimPlugins.lazy-nvim ]; # let lazy.nvim manage every other plugin }; oh-my-posh = { @@ -128,7 +147,7 @@ }; vim = { enable = true; - defaultEditor = true; + defaultEditor = false; plugins = with pkgs.vimPlugins; [ syntastic tabular @@ -233,6 +252,7 @@ bcrrs = "bcrr --stream --no-verbose"; beo = "bundle exec onceover run spec --trace --force"; biv = "bundle install --path=vendor/bundle"; + bottom = "echo 'To run bottom, the command is btm'"; ce = "code-exploration"; dots = "cd ~/repos/dots"; gbc = '' @@ -245,6 +265,7 @@ sal = "ssh-add -L"; st = "open -a SourceTree"; sz = "source ~/.zshrc"; + trippy = "echo 'To run trippy, the command is trip'"; usegpg = "killall ssh-agent; export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) && gpgconf --launch gpg-agent"; usessh = "gpgconf --kill gpg-agent"; }; @@ -252,8 +273,12 @@ }; # end programs home.file = { - ".config/nvim/lua" = { - source = ../files/nvim/lua; + ".config/nvim/lua/config" = { + source = ../files/nvim/lua/config; + recursive = true; + }; + ".config/nvim/lua/plugins" = { + source = ../files/nvim/lua/plugins; recursive = true; }; ".config/powershell/Microsoft.PowerShell_profile.ps1".source = ../files/Microsoft.PowerShell_profile.ps1; diff --git a/modules/home-manager/files/nvim/lua/config/keymaps.lua b/modules/home-manager/files/nvim/lua/config/keymaps.lua index 2d096b8..0a1e7e2 100644 --- a/modules/home-manager/files/nvim/lua/config/keymaps.lua +++ b/modules/home-manager/files/nvim/lua/config/keymaps.lua @@ -1,6 +1,9 @@ vim.g.mapleader = " " vim.g.maplocalleader = " " +-- make sure vim know I always have a dark terminal +vim.opt.background = "dark" + -- use spaces for tabs and whatnot vim.opt.expandtab = true vim.opt.tabstop = 2 @@ -8,4 +11,4 @@ vim.opt.softtabstop = 2 vim.opt.shiftwidth = 2 vim.opt.shiftround = true -vim.keymap.set('n', 'h', ':nohlsearch') +vim.keymap.set("n", "h", ":nohlsearch") diff --git a/modules/home-manager/files/nvim/lua/plugins/cheatsheet.lua b/modules/home-manager/files/nvim/lua/disabled/cheatsheet.lua similarity index 100% rename from modules/home-manager/files/nvim/lua/plugins/cheatsheet.lua rename to modules/home-manager/files/nvim/lua/disabled/cheatsheet.lua diff --git a/modules/home-manager/files/nvim/lua/plugins/telescope-cheat.lua b/modules/home-manager/files/nvim/lua/plugins/telescope-cheat.lua new file mode 100644 index 0000000..263ea37 --- /dev/null +++ b/modules/home-manager/files/nvim/lua/plugins/telescope-cheat.lua @@ -0,0 +1,7 @@ +return { + "nvim-telescope/telescope-cheat.nvim", + dependencies = { + "kkharji/sqlite.lua", + "nvim-telescope/telescope.nvim", + }, +} diff --git a/modules/home-manager/files/nvim/lua/plugins/telescope-symbols.lua b/modules/home-manager/files/nvim/lua/plugins/telescope-symbols.lua new file mode 100644 index 0000000..322ccc0 --- /dev/null +++ b/modules/home-manager/files/nvim/lua/plugins/telescope-symbols.lua @@ -0,0 +1 @@ +return { "nvim-telescope/telescope-symbols.nvim" } diff --git a/modules/home-manager/files/nvim/lua/plugins/telescope-ui-select.lua b/modules/home-manager/files/nvim/lua/plugins/telescope-ui-select.lua index 078c00e..5458189 100644 --- a/modules/home-manager/files/nvim/lua/plugins/telescope-ui-select.lua +++ b/modules/home-manager/files/nvim/lua/plugins/telescope-ui-select.lua @@ -1,18 +1,3 @@ return { "nvim-telescope/telescope-ui-select.nvim", - config = function () - -- This is your opts table - require("telescope").setup({ - extensions = { - ["ui-select"] = { - require("telescope.themes").get_dropdown({ - -- even more opts - }) - } - } - }) - -- load_extension, somewhere after setup function: - require("telescope").load_extension("ui-select") - end } - diff --git a/modules/home-manager/files/nvim/lua/plugins/telescope.lua b/modules/home-manager/files/nvim/lua/plugins/telescope.lua index b0ad305..7ced43b 100644 --- a/modules/home-manager/files/nvim/lua/plugins/telescope.lua +++ b/modules/home-manager/files/nvim/lua/plugins/telescope.lua @@ -1,13 +1,29 @@ return { "nvim-telescope/telescope.nvim", - tag = "0.1.5", + tag = "0.1.5", dependencies = { "nvim-lua/plenary.nvim" }, - config = function () - local builtin = require('telescope.builtin') + config = function() + -- This is your opts table + require("telescope").setup({ + extensions = { + ["ui-select"] = { + require("telescope.themes").get_dropdown({ + -- even more opts + }), + }, + }, + }) - vim.keymap.set('n', '', builtin.find_files, {}) - vim.keymap.set('n', '', builtin.oldfiles, {}) - vim.keymap.set('n', 'fg', builtin.live_grep, {}) - vim.keymap.set('n', 'fh', builtin.help_tags, {}) - end + -- load_extension, somewhere after setup function: + require("telescope").load_extension("cheat") + require("telescope").load_extension("ui-select") + + local builtin = require("telescope.builtin") + + vim.keymap.set("n", "ts", ":Telescope") + vim.keymap.set("n", "", builtin.find_files, {}) + vim.keymap.set("n", "", builtin.oldfiles, {}) + vim.keymap.set("n", "fg", builtin.live_grep, {}) + vim.keymap.set("n", "fh", builtin.help_tags, {}) + end, } diff --git a/modules/system/common/all-darwin.nix b/modules/system/common/all-darwin.nix index 408fa99..296cfd7 100644 --- a/modules/system/common/all-darwin.nix +++ b/modules/system/common/all-darwin.nix @@ -8,6 +8,7 @@ ]; systemPackages = with pkgs; [ age + bandwhich coreutils hugo mas @@ -46,11 +47,14 @@ "font-inconsolata-g-for-powerline" "font-source-code-pro-for-powerline" "gitkraken" + "handbrake" "iterm2" "keepingyouawake" "libreoffice" "logseq" + "makemkv" "meld" + "MKVToolNix" "nextcloud" "onlyoffice" "raycast" diff --git a/modules/system/common/all-nixos.nix b/modules/system/common/all-nixos.nix index 9dffacd..cda42f0 100644 --- a/modules/system/common/all-nixos.nix +++ b/modules/system/common/all-nixos.nix @@ -43,6 +43,7 @@ }; programs = { + bandwhich.enable = true; zsh.enable = true; };