From bd2e9ca61d4984c7fbfca77a1a9291c16c24e3ee Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Mon, 19 Jan 2026 23:08:50 +0100 Subject: [PATCH 1/5] nvim: QoL features --- modules/common/shell/aliases.nix | 3 +- .../nvim/lua/thegeneralist/lazy/colors.lua | 2 +- .../nvim/lua/thegeneralist/lazy/snacks.lua | 91 +++++++++++++++++++ 3 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua diff --git a/modules/common/shell/aliases.nix b/modules/common/shell/aliases.nix index 30f039b..92b0a24 100644 --- a/modules/common/shell/aliases.nix +++ b/modules/common/shell/aliases.nix @@ -16,7 +16,8 @@ tree = "eza --tree --git-ignore --group-directories-first"; # Editor aliases - v = "nvim ."; + x = "nvim ."; + v = "nvim"; vi = "vim"; vim = "nvim"; diff --git a/modules/dotfiles/nvim/lua/thegeneralist/lazy/colors.lua b/modules/dotfiles/nvim/lua/thegeneralist/lazy/colors.lua index 60770c0..e3727bd 100644 --- a/modules/dotfiles/nvim/lua/thegeneralist/lazy/colors.lua +++ b/modules/dotfiles/nvim/lua/thegeneralist/lazy/colors.lua @@ -1,6 +1,6 @@ function ColorMyPencils(color) -- color = color or "rose-pine" - color = color or "tokyonight-storm" or "rose-pine" or "tokyonight-night" + color = color or "catppuccin-mocha" or "tokyonight-storm" or "rose-pine" or "tokyonight-night" vim.cmd.colorscheme(color) -- vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) diff --git a/modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua b/modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua new file mode 100644 index 0000000..da1afae --- /dev/null +++ b/modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua @@ -0,0 +1,91 @@ +return { + { + "dmtrKovalenko/fff.nvim", + build = function() + require("fff.download").download_or_build_binary() + end, + opts = { -- (optional) + debug = { + enabled = false, + show_scores = true, + }, + }, + -- No need to lazy-load with lazy.nvim. + -- This plugin initializes itself lazily. + lazy = false, + keys = { + { + "ff", -- try it if you didn't it is a banger keybinding for a picker + function() + require("fff").find_files() + end, + desc = "FFFind files", + }, + }, + }, + { + "folke/snacks.nvim", + priority = 1000, + lazy = false, + ---@type snacks.Config + opts = { + bigfile = { enabled = true }, + dashboard = { + enabled = true, + preset = { + keys = { + { + icon = " ", + key = "f", + desc = "Find File", + -- action = ":lua Snacks.dashboard.pick('files')" + action = ":lua require('fff').find_files()", + }, + { icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" }, + { + icon = " ", + key = "g", + desc = "Find Text", + action = ":lua Snacks.dashboard.pick('live_grep')", + }, + { + icon = " ", + key = "r", + desc = "Recent Files", + action = ":lua Snacks.dashboard.pick('oldfiles')", + }, + { + icon = " ", + key = "c", + desc = "Config", + action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})", + }, + { icon = " ", key = "s", desc = "Restore Session", section = "session" }, + { + icon = "󰒲 ", + key = "L", + desc = "Lazy", + action = ":Lazy", + enabled = package.loaded.lazy ~= nil, + }, + { icon = " ", key = "q", desc = "Quit", action = ":qa" }, + }, + }, + }, + explorer = { enabled = false }, + image = { enabled = true }, + input = { enabled = true }, + + picker = { enabled = true }, + notifier = { enabled = false }, + quickfile = { enabled = true }, + + scope = { enabled = true }, + + -- hmmm: + scroll = { enabled = false }, + statuscolumn = { enabled = false }, + words = { enabled = false }, + }, + }, +} From 437d52c35d30bf5c713335fc38f12ff61afc5520 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Tue, 20 Jan 2026 16:28:08 +0100 Subject: [PATCH 2/5] nvim: shortcut and dashboard changes - nvim: shorcut and dashboard changes - shell: fix greeting --- modules/common/shell/0_nushell.nu | 16 ------------- modules/common/shell/aliases.nix | 1 + modules/common/shell/greeting.nix | 23 +++++++++++++++++++ .../nvim/lua/thegeneralist/lazy/snacks.lua | 17 ++++++++++++++ .../nvim/lua/thegeneralist/lazy/telescope.lua | 6 ++--- .../dotfiles/nvim/lua/thegeneralist/remap.lua | 2 +- 6 files changed, 45 insertions(+), 20 deletions(-) create mode 100644 modules/common/shell/greeting.nix diff --git a/modules/common/shell/0_nushell.nu b/modules/common/shell/0_nushell.nu index a0c4951..21c5d80 100644 --- a/modules/common/shell/0_nushell.nu +++ b/modules/common/shell/0_nushell.nu @@ -423,20 +423,4 @@ def --wrapped jc [...arguments: string@"nu-complete jc"]: [any -> table, any -> } } -# Your custom greeting -def greeting [] { - let quotes = [ - "What is impossible for you is not impossible for me." - "Why do we fall, Master Wayne? So that we can learn to pick ourselves up. - Alfred Pennyworth" - "Endure, Master Wayne. Take it. They'll hate you for it, but that's the point of Batman. He can be the outcast. He can make the choice… that no one else can make. The right choice. - Alfred Pennyworth" - "— I never said thank you.\n— And you will never have to." - "A hero can be anyone, even a man doing something as simple and reassuring as putting a coat on a young boy's shoulders to let him know that the world hadn't ended. - Batman" - "— Come with me. Save yourself. You don't owe these ppl anymore, you've given them everything.\n— Not everything. Not yet." - "The night is always darkest before the dawn, but I promise you, the dawn is coming. - Harvey Dent" - "It's not who you are underneath, but what you do that defines you. - Batman" - "The idea was to be a symbol. Batman... could be anybody. That was the point. - Bruce Wayne" - ] - echo ($quotes | get (random int 0..(($quotes | length) - 1))) -} - greeting diff --git a/modules/common/shell/aliases.nix b/modules/common/shell/aliases.nix index 92b0a24..7f1ea3c 100644 --- a/modules/common/shell/aliases.nix +++ b/modules/common/shell/aliases.nix @@ -35,6 +35,7 @@ ela = "eza -la"; # Git aliases + lg = "lazygit"; gs = "git status"; ga = "git add"; gc = "git commit"; diff --git a/modules/common/shell/greeting.nix b/modules/common/shell/greeting.nix new file mode 100644 index 0000000..ca4aa26 --- /dev/null +++ b/modules/common/shell/greeting.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: +let + greeting = pkgs.writeScriptBin "greeting" '' + #!${pkgs.nushell}/bin/nu + + let quotes = [ + "What is impossible for you is not impossible for me." + "Why do we fall, Master Wayne? So that we can learn to pick ourselves up. - Alfred Pennyworth" + "Endure, Master Wayne. Take it. They'll hate you for it, but that's the point of Batman. He can be the outcast. He can make the choice that no one else can make. The right choice. - Alfred Pennyworth" + "— I never said thank you.\n— And you will never have to." + "A hero can be anyone, even a man doing something as simple and reassuring as putting a coat on a young boy's shoulders to let him know that the world hadn't ended. - Batman" + "— Come with me. Save yourself. You don't owe these ppl anymore, you've given them everything.\n— Not everything. Not yet." + "The night is always darkest before the dawn, but I promise you, the dawn is coming. - Harvey Dent" + "It's not who you are underneath, but what you do that defines you. - Batman" + "The idea was to be a symbol. Batman... could be anybody. That was the point. - Bruce Wayne" + ] + + print ($quotes | get (random int 0..(($quotes | length) - 1))) + ''; +in +{ + environment.systemPackages = [ greeting ]; +} diff --git a/modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua b/modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua index da1afae..9ffa1a3 100644 --- a/modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua +++ b/modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua @@ -27,6 +27,10 @@ return { "folke/snacks.nvim", priority = 1000, lazy = false, + dependencies = { + "nvim-tree/nvim-web-devicons", + "nvim-mini/mini.icons", + }, ---@type snacks.Config opts = { bigfile = { enabled = true }, @@ -71,6 +75,19 @@ return { { icon = " ", key = "q", desc = "Quit", action = ":qa" }, }, }, + sections = { + { + section = "terminal", + cmd = "greeting", + hl = "header", + height = 3, + padding = 2, + align = "center", + }, + { section = "keys", gap = 1, padding = 1 }, + { icon = " ", title = "Recent Files", section = "recent_files", indent = 3, padding = 3 }, + { section = "startup" }, + }, }, explorer = { enabled = false }, image = { enabled = true }, diff --git a/modules/dotfiles/nvim/lua/thegeneralist/lazy/telescope.lua b/modules/dotfiles/nvim/lua/thegeneralist/lazy/telescope.lua index 8acccf9..b4fe6ea 100644 --- a/modules/dotfiles/nvim/lua/thegeneralist/lazy/telescope.lua +++ b/modules/dotfiles/nvim/lua/thegeneralist/lazy/telescope.lua @@ -21,7 +21,7 @@ return { local builtin = require("telescope.builtin") pcall(require("telescope").load_extension, "fzf") - vim.keymap.set("n", "ps", function() + vim.keymap.set("n", "fs", function() local search_string = vim.fn.input("Grep > ") if search_string == "" then return @@ -39,9 +39,9 @@ return { builtin.grep_string({ search = word }) end) - vim.keymap.set("n", "pg", builtin.live_grep, {}) + vim.keymap.set("n", "fw", builtin.live_grep, {}) + - vim.keymap.set("n", "pf", builtin.find_files, {}) vim.keymap.set("n", "", builtin.git_files, {}) diff --git a/modules/dotfiles/nvim/lua/thegeneralist/remap.lua b/modules/dotfiles/nvim/lua/thegeneralist/remap.lua index 41b94c0..c626618 100755 --- a/modules/dotfiles/nvim/lua/thegeneralist/remap.lua +++ b/modules/dotfiles/nvim/lua/thegeneralist/remap.lua @@ -38,7 +38,7 @@ vim.keymap.set("i", "", "") vim.keymap.set("n", "Q", "") vim.keymap.set("n", "", "silent !tmux neww tmux-sessionizer") -vim.keymap.set("n", "f", vim.lsp.buf.format) +vim.keymap.set("n", "fr", vim.lsp.buf.format) vim.keymap.set("n", "m", "cnextzz") vim.keymap.set("n", "m", "cprevzz") From b01fd386ab7d2c9da219e33f9847fdd6ef8e639c Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Tue, 20 Jan 2026 16:32:16 +0100 Subject: [PATCH 3/5] chore: add .gitignore --- .gitignore | 25 +++++++++++++++++++++++++ .zshrc | 1 - 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .gitignore delete mode 120000 .zshrc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d28df52 --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +* + +!.gitignore + +!docs +!docs/** + +!hosts +!hosts/** + +!lib +!lib/** + +!modules +!modules/** + +!nixpkgs-overlay +!nixpkgs-overlay/** + +!AGENTS.md +!flake.lock +!flake.nix +!keys.nix +!rebuild.nu +!secrets.nix diff --git a/.zshrc b/.zshrc deleted file mode 120000 index ad9849f..0000000 --- a/.zshrc +++ /dev/null @@ -1 +0,0 @@ -/nix/store/mlnm2lb8zaplnmaqb9k0pfprdwqbdn8b-home-manager-files/.zshrc \ No newline at end of file From 552a6d8f42ae66ebe1b6e655cef63c0951fab4ee Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Tue, 20 Jan 2026 16:41:31 +0100 Subject: [PATCH 4/5] aliases: add `rbc` --- modules/common/shell/aliases.nix | 1 + modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/common/shell/aliases.nix b/modules/common/shell/aliases.nix index 7f1ea3c..419d3ef 100644 --- a/modules/common/shell/aliases.nix +++ b/modules/common/shell/aliases.nix @@ -52,6 +52,7 @@ # Rebuild helper rb = "nh darwin switch . -- --extra-experimental-features \"nix-command pipe-operators\""; + rbc = "nh darwin switch . -- --extra-experimental-features \"nix-command pipe-operators\" --option extra-substituters \"\""; rebuild = "${../../../rebuild.nu}"; }; } diff --git a/modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua b/modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua index 9ffa1a3..3d183ac 100644 --- a/modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua +++ b/modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua @@ -80,6 +80,7 @@ return { section = "terminal", cmd = "greeting", hl = "header", + ttl = 60, height = 3, padding = 2, align = "center", From f9791ff888d1cd254990bb13d018fd9f43900af8 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Tue, 20 Jan 2026 18:17:48 +0100 Subject: [PATCH 5/5] shell: add aliases --- modules/common/shell/aliases.nix | 2 ++ modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/common/shell/aliases.nix b/modules/common/shell/aliases.nix index 419d3ef..8f57ece 100644 --- a/modules/common/shell/aliases.nix +++ b/modules/common/shell/aliases.nix @@ -39,9 +39,11 @@ gs = "git status"; ga = "git add"; gc = "git commit"; + gcm = "git commit -m"; gp = "git push"; gl = "git log"; gd = "git diff"; + gdc = "git diff --cached"; gco = "git checkout"; gb = "git branch"; gm = "git merge"; diff --git a/modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua b/modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua index 3d183ac..2310ca9 100644 --- a/modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua +++ b/modules/dotfiles/nvim/lua/thegeneralist/lazy/snacks.lua @@ -15,7 +15,7 @@ return { lazy = false, keys = { { - "ff", -- try it if you didn't it is a banger keybinding for a picker + "ff", -- try it if you didn't it is a banger keybinding for a picker function() require("fff").find_files() end,