From 0a5d9bfc17d0d56d6a972fa18bdb48e77708982b Mon Sep 17 00:00:00 2001 From: chloe caruso Date: Thu, 21 Aug 2025 00:37:56 -0700 Subject: [PATCH 01/24] fix: autofmt doesn't work in deno tried to reduce but it's not worth it and related issues being open for years gives me no confidence they will fix this. it also does not work in bun, but i've opened https://github.com/oven-sh/bun/issues/22018 --- packages/autofmt/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/autofmt/default.nix b/packages/autofmt/default.nix index 54893c07aca0b08fc951b8dfee853e6df317f616..e46fbf6af502665fa5ddcbd146ae6c8d8d62b218 100644 --- a/packages/autofmt/default.nix +++ b/packages/autofmt/default.nix @@ -10,5 +10,5 @@ pkgs.writeShellApplication { zig clang-tools ]; - text = ''exec deno run -A ${./autofmt.js} "$@"''; + text = ''exec ${pkgs.nodejs}/bin/node ${./autofmt.js} "$@"''; } -- 2.54.0 From 1052a1ccc3d91a32648090733bef9d1ae6819c55 Mon Sep 17 00:00:00 2001 From: chloe caruso Date: Thu, 21 Aug 2025 01:07:36 -0700 Subject: [PATCH 02/24] feat: support 'prettierd' in autofmt prettierd is a daemon for prettier, allowing lower latency formats see https://github.com/fsouza/prettierd --- packages/autofmt/autofmt.js | 61 ++++++++++++++++++++++++++++++------ packages/autofmt/default.nix | 5 +-- 2 files changed, 55 insertions(+), 11 deletions(-) diff --git a/packages/autofmt/autofmt.js b/packages/autofmt/autofmt.js index dc8481d663f42c7849af589caaf249260b63e4b6..ef74cbf9a340d1f69c3809cddfafd0a3e95d180e 100755 --- a/packages/autofmt/autofmt.js +++ b/packages/autofmt/autofmt.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -// autofmt v1 by paper clover +// autofmt v2 by paper clover // https://paperclover.dev/nix/config/src/branch/main/packages/autofmt/autofmt.js // // Different codebases use different formatters. Autofmt looks for project @@ -25,6 +25,10 @@ // } // }, // +// CHANGELOG +// v2: added 'prettierd' as a supported formatter option. +// v1: initial release +// // @ts-nocheck // -- definitions -- @@ -72,6 +76,15 @@ const formatters = { cmd: ["deno", "fmt", "--", "$files"], stdin: (file) => ["deno", "fmt", "--ext", path.extname(file).slice(1), "-"], }, + prettierd: { + // keep in mind that pretterd never exits. + // https://github.com/fsouza/prettierd/issues/645 + languages: ["javascript", "markdown", "json", "yaml", "mdx", "html", "css"], + mustMatchFile: true, + files: { "node_modules/.bin/prettier": () => which("prettierd") }, + cmd: null, + stdin: (file) => ["prettierd", file], + }, prettier: { languages: ["javascript", "markdown", "json", "yaml", "mdx", "html", "css"], files: ["node_modules/.bin/prettier"], @@ -91,7 +104,7 @@ const formatters = { "nixfmt-rfc-style": { languages: ["nix"], files: { - "flake.nix": (contents) => contents.includes("nixfmt"), + "flake.nix": ({ text }) => text.includes("nixfmt"), }, cmd: ["nixfmt", "--", "$files"], stdin: (file) => ["nixfmt", `--filename=${file}`], @@ -99,7 +112,7 @@ const formatters = { alejandra: { languages: ["nix"], files: { - "flake.nix": (contents) => contents.includes("alejandra"), + "flake.nix": ({ text }) => text.includes("alejandra"), }, cmd: ["alejandra", "--", "$files"], stdin: () => ["alejandra"], @@ -498,24 +511,31 @@ function pickFormatter(file) { return walkUp(dir, (x) => { const children = readDir(x); for (const fmt of order) { + if (formatters[fmt][stdio ? "stdin" : "cmd"] == null) continue; + let matches = false; if (formatters[fmt].files === true) { matches = true; } if (!matches) { const filesToCheck = Array.isArray(formatters[fmt].files) - ? formatters[fmt].files.map((base) => ({ base, contents: true })) + ? formatters[fmt].files.map((base) => ({ base, check: true })) : Object.entries(formatters[fmt].files) - .map(([base, contents]) => ({ base, contents })); - for (const { base, contents } of filesToCheck) { + .map(([base, check]) => ({ base, check })); + for (const { base, check } of filesToCheck) { if (base.includes("/")) { matches = readDir(path.join(x, path.dirname(base))) // .includes(path.basename(base)); } else { matches = children.includes(base); } - if (matches && typeof contents === "function") { - matches = !!contents(fs.readFileSync(path.join(x, base), "utf-8")); + if (matches && typeof check === "function") { + let text; + matches = !!check({ + get text() { + return text ??= fs.readFileSync(path.join(x, base), "utf-8"); + }, + }); } } } @@ -526,7 +546,7 @@ function pickFormatter(file) { return formatterId; } } - }) ?? possible[0]; + }) ?? possible.find((fmt) => !formatters[fmt].mustMatchFile); } /** @param dir {string} @param find {(x: string) => any} */ @@ -581,6 +601,29 @@ function readGitIgnore(dir) { } } +/** @param {string} name @returns {string | null} */ +export function which(name) { + const paths = + process.env.PATH?.split(process.platform === "win32" ? ";" : ":") ?? []; + const exts = process.platform === "win32" + ? (process.env.PATHEXT?.split(";") ?? [".exe", ".cmd", ".bat", ".com"]) + : [""]; + + for (const dir of paths) { + if (!dir) continue; + try { + const entries = readDir(dir); + for (const ext of exts) { + const target = name + ext; + if (entries.includes(target)) { + return dir + sep + target; + } + } + } catch {} + } + return null; +} + function escapeGlob(str) { return str.replace(/[\\*,{}]/g, "\\$&"); } diff --git a/packages/autofmt/default.nix b/packages/autofmt/default.nix index e46fbf6af502665fa5ddcbd146ae6c8d8d62b218..fa006e3e7dc0b83bcc7ebb686daafe54b4925e08 100644 --- a/packages/autofmt/default.nix +++ b/packages/autofmt/default.nix @@ -3,12 +3,13 @@ pkgs.writeShellApplication { name = "autofmt"; runtimeInputs = with pkgs; [ # include only a couple of formatters by default + clang-tools deno - nixfmt-rfc-style dprint + nixfmt-rfc-style + prettierd # autofmt only runs on a local build of prettier rustfmt zig - clang-tools ]; text = ''exec ${pkgs.nodejs}/bin/node ${./autofmt.js} "$@"''; } -- 2.54.0 From b34edc3a519a0efebb9f39e24b0998d98309c99c Mon Sep 17 00:00:00 2001 From: chloe caruso Date: Thu, 21 Aug 2025 01:57:32 -0700 Subject: [PATCH 03/24] feat(vim): Smart quit popup space q will close the application if all buffers are saved, otherwise a dialog box shows up with the buffers that are not saved. --- .../{lib.lua => commands/FullscreenTerm.lua} | 0 modules/neovim/commands/SmartQuit.lua | 96 +++++++++++++++++++ modules/neovim/default.nix | 18 +++- modules/neovim/keybind.nix | 1 + users/clover/vim.nix | 30 +++--- users/natalie/vim/languages.nix | 1 + 6 files changed, 130 insertions(+), 16 deletions(-) rename modules/neovim/{lib.lua => commands/FullscreenTerm.lua} (100%) create mode 100644 modules/neovim/commands/SmartQuit.lua diff --git a/modules/neovim/lib.lua b/modules/neovim/commands/FullscreenTerm.lua similarity index 100% rename from modules/neovim/lib.lua rename to modules/neovim/commands/FullscreenTerm.lua diff --git a/modules/neovim/commands/SmartQuit.lua b/modules/neovim/commands/SmartQuit.lua new file mode 100644 index 0000000000000000000000000000000000000000..f6647d54d2d5bfafcc51305af5641dc5612e077e --- /dev/null +++ b/modules/neovim/commands/SmartQuit.lua @@ -0,0 +1,96 @@ +vim.api.nvim_create_user_command("SmartQuit", function(opts) + -- scan all buffers for unsaved buffers + local unsaved = {} + local saved = {} + for _, buf in ipairs(vim.api.nvim_list_bufs()) do + if vim.api.nvim_buf_is_loaded(buf) and vim.api.nvim_buf_get_option(buf, "buflisted") then + if vim.api.nvim_buf_get_option(buf, "modified") then + table.insert(unsaved, buf) + else + table.insert(saved, buf) + end + end + end + + if #unsaved == 0 then + vim.cmd("qa") + return + end + + -- gui for resolving unsaved files + local lines = {} + for _, buf in ipairs(unsaved) do + local full_path = vim.api.nvim_buf_get_name(buf) + local name = full_path == "" and ("[No Name] #" .. buf) or vim.fn.fnamemodify(full_path, ":~:.") + table.insert(lines, " • " .. name) + end + table.insert(lines, "") + table.insert(lines, " s - Save all and quit") + table.insert(lines, " c - Close saved; leave unsaved open") + table.insert(lines, " d - DISCARD ALL") + + local buf = vim.api.nvim_create_buf(false, true) + vim.api.nvim_buf_set_lines(buf, 0, -1, false, lines) + vim.api.nvim_buf_set_option(buf, "readonly", true) + local width = math.max(unpack(vim.tbl_map(function(l) return #l end, lines))) + local height = #lines + local win = vim.api.nvim_open_win(buf, true, { + relative = "editor", + width = width + 1, + height = height, + row = (vim.o.lines - height) / 2 - 1, + col = (vim.o.columns - width) / 2, + style = "minimal", + border = "rounded", + title = { + { #unsaved .. " Unsaved Buffer" .. (#unsaved != 1 and "s" or "") .. "!", "ErrorMsg" }, + }, + title_pos = "center", + }) + + vim.wo[win].winhighlight = "Normal:Normal,FloatBorder:ErrorMsg" + vim.api.nvim_win_set_option(win, "cursorline", false) + + local hl = vim.api.nvim_get_hl_by_name('Cursor', true) + hl.blend = 100 + vim.api.nvim_set_hl(0, 'Cursor', hl) + vim.opt.guicursor:append('a:Cursor/lCursor') + + function close() + local hl = vim.api.nvim_get_hl_by_name('Cursor', true) + hl.blend = 0 + vim.api.nvim_set_hl(0, 'Cursor', hl) + vim.opt.guicursor:remove('a:Cursor/lCursor') + vim.api.nvim_win_close(win, true) + end + + -- keyboard event handlers + vim.keymap.set("n", "s", function() + for _, buf in ipairs(unsaved) do + vim.api.nvim_buf_call(buf, function() + vim.cmd("write") + end) + end + close() + vim.cmd("qa") + end, { buffer = buf }) + vim.keymap.set("n", "c", function() + for _, buf in ipairs(saved) do + vim.api.nvim_buf_delete(buf, {}) + end + close() + end, { buffer = buf }) + vim.keymap.set("n", "d", function() + vim.cmd("qa!") + end, { buffer = buf }) + vim.keymap.set("n", "", function() + close() + end, { buffer = buf }) + + vim.api.nvim_create_autocmd({ 'WinLeave' }, { + buffer = buf, + callback = close, + }) +end, { nargs = 0 }) + +vim.api.nvim_set_hl(0, "QuitPopUpBorder", { fg = "red" }) diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index 446fe23840991d9e30473eb9ce2c347102b9b247..c4366025d818604be49e141e172c44fd5492f604 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -20,7 +20,8 @@ # which allows user configurations to disable/override anything here. config.vim = lib.mkOverride 999 { extraLuaFiles = [ - ./lib.lua + ./commands/FullscreenTerm.lua + ./commands/SmartQuit.lua ]; theme = { @@ -57,7 +58,7 @@ lspkind.enable = config.vim.autocomplete.blink-cmp.enable; # Enables inlay hints (types info in rust and shit) inlayHints.enable = true; - #Nice mappings that i use :3 + # Nice mappings that I use :3 mappings = { codeAction = "ca"; goToDeclaration = "gD"; @@ -114,6 +115,19 @@ setupOpts = { enable_cursor_hijack = true; git_status_async = true; + close_if_last_window = true; + filesystem.filtered_items = { + # dotfiles are often used for project configuration + hide_dotfiles = false; + never_show = [ + ".DS_Store" # macOS + "thumbs.db" # Windows + ]; + never_show_by_pattern = [ + ".*.swp" + "._*" # macOS + ]; + }; }; }; fzf-lua = { diff --git a/modules/neovim/keybind.nix b/modules/neovim/keybind.nix index 42732a67b0f9f0d2280f4c549d81b4a33ad10eee..2b4a4d2e9d0d4ed45410e2e32772523504c6a7bc 100644 --- a/modules/neovim/keybind.nix +++ b/modules/neovim/keybind.nix @@ -21,6 +21,7 @@ in toggle-explorer = keyCmd "n" "e" "Neotree toggle"; reveal-active-file = keyCmd "n" "E" "Neotree reveal:Neotree focus"; lazygit = keyCmd "n" "gg" "FullscreenTerm ${pkgs.lazygit}/bin/lazygit"; + smart-quit = keyCmd "n" "q" "SmartQuit"; # pickers pick-file = keyCmd "n" "" "FzfLua files"; diff --git a/users/clover/vim.nix b/users/clover/vim.nix index 84bac23ce713af41bcc8bce973f866f8a403b8be..9ada4b1e147f68b899bf6a7ba1cdf1ba315045ef 100644 --- a/users/clover/vim.nix +++ b/users/clover/vim.nix @@ -1,20 +1,22 @@ _: { vim = { - options = { - linebreak = true; - }; - git = { - gitsigns.setupOpts = { - current_line_blame = false; - current_line_blame_opts = { - virt_text = true; - virt_text_pos = "right_align"; - delay = 25; - ignore_whitespace = true; - virt_text_priority = 100; - use_focus = true; - }; + languages.lua.enable = false; # broken + options.linebreak = true; + git.gitsigns.setupOpts = { + current_line_blame = false; + current_line_blame_opts = { + virt_text = true; + virt_text_pos = "right_align"; + delay = 25; + ignore_whitespace = true; + virt_text_priority = 100; + use_focus = true; }; }; + # filetree.neo-tree.setupOpts.default_component_configs.indent = { + # padding = 0; + # indent_marker = "|"; + # last_indent_marker = "+"; + # }; }; } diff --git a/users/natalie/vim/languages.nix b/users/natalie/vim/languages.nix index 9c447ed006f378b5e3750dda65e37e0c70bd4654..6c370854799533d6388b8eb992df055f6df93b7a 100644 --- a/users/natalie/vim/languages.nix +++ b/users/natalie/vim/languages.nix @@ -11,6 +11,7 @@ python312Packages.pylatexenc ]; languages = { + lua.lsp.enable = true; lua.lsp.lazydev.enable = true; python = { format.type = "ruff"; -- 2.54.0 From d0037cbf0eccb463bbc39830413e1c0c09b23885 Mon Sep 17 00:00:00 2001 From: chloe caruso Date: Thu, 21 Aug 2025 01:59:19 -0700 Subject: [PATCH 04/24] chore(natalie): remove keybinds.nix these keybinds are all superceded in the shared config --- users/natalie/vim/default.nix | 1 - users/natalie/vim/keybinds.nix | 19 ------------------- 2 files changed, 20 deletions(-) delete mode 100644 users/natalie/vim/keybinds.nix diff --git a/users/natalie/vim/default.nix b/users/natalie/vim/default.nix index 63c80f97b3ccd455d32b881c008d631a5c84b5b4..9d7518bb41816b453399dd044663a511ba364078 100644 --- a/users/natalie/vim/default.nix +++ b/users/natalie/vim/default.nix @@ -1,7 +1,6 @@ { ... }: { imports = [ - ./keybinds.nix ./languages.nix ./latex.nix ./visuals.nix diff --git a/users/natalie/vim/keybinds.nix b/users/natalie/vim/keybinds.nix deleted file mode 100644 index 6caf7ac8721a35ba329f7e7771290dceff01d7e4..0000000000000000000000000000000000000000 --- a/users/natalie/vim/keybinds.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ ... }: -let - mkKeymap = mode: key: action: desc: { - inherit mode; - inherit key action desc; - }; - n = mkKeymap "n"; # normal mode -in -{ - vim = { - keymaps = [ - (n "e" ":lua require('snacks').explorer()" "File Explorer") - # Snacks Picker Replaces Telescope!? - (n "" ":lua require('snacks').picker.smart()" "Smart Find Files") - (n "ff" ":lua require('snacks').picker.files()" "Find File") - (n "fg" ":lua require('snacks').picker.grep()" "Grep Files") - ]; - }; -} -- 2.54.0 From 8b1a2872ac3437b30b2785bff1014a5399d54e5f Mon Sep 17 00:00:00 2001 From: chloe caruso Date: Thu, 21 Aug 2025 02:43:32 -0700 Subject: [PATCH 05/24] fix: smartquit had a syntax error my bad chat --- modules/neovim/commands/SmartQuit.lua | 2 +- users/clover/vim.nix | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/neovim/commands/SmartQuit.lua b/modules/neovim/commands/SmartQuit.lua index f6647d54d2d5bfafcc51305af5641dc5612e077e..9bd9ccdfc7673eec8a9bebbc61e3f1c32fc96bf7 100644 --- a/modules/neovim/commands/SmartQuit.lua +++ b/modules/neovim/commands/SmartQuit.lua @@ -43,7 +43,7 @@ vim.api.nvim_create_user_command("SmartQuit", function(opts) style = "minimal", border = "rounded", title = { - { #unsaved .. " Unsaved Buffer" .. (#unsaved != 1 and "s" or "") .. "!", "ErrorMsg" }, + { #unsaved .. " Unsaved Buffer" .. (#unsaved ~= 1 and "s" or "") .. "!", "ErrorMsg" }, }, title_pos = "center", }) diff --git a/users/clover/vim.nix b/users/clover/vim.nix index 9ada4b1e147f68b899bf6a7ba1cdf1ba315045ef..ec63c29156845ebab16ed99f6e77db903a5fa83d 100644 --- a/users/clover/vim.nix +++ b/users/clover/vim.nix @@ -1,6 +1,7 @@ -_: { +{ lib, ... }: +{ vim = { - languages.lua.enable = false; # broken + languages.lua.enable = lib.mkForce true; options.linebreak = true; git.gitsigns.setupOpts = { current_line_blame = false; -- 2.54.0 From cf72e73615f2872f4342732aafd6c735cb31aace Mon Sep 17 00:00:00 2001 From: chloe caruso Date: Thu, 21 Aug 2025 15:38:12 -0700 Subject: [PATCH 06/24] changes to neovim lsp keybinds --- modules/neovim/default.nix | 18 ++++++++++++++---- modules/neovim/keybind.nix | 1 + users/clover/home.nix | 4 ++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index c4366025d818604be49e141e172c44fd5492f604..5d9d90eb73d8689599da9d3a966155f48f6c923f 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -60,15 +60,17 @@ inlayHints.enable = true; # Nice mappings that I use :3 mappings = { - codeAction = "ca"; + codeAction = null; # in keymaps goToDeclaration = "gD"; goToDefinition = "gd"; - listReferences = "gr"; - goToType = "gy"; + # TODO: changing these works but there is something else defining stuff + # like grn, grr, grt, etc + listReferences = "grr"; + goToType = "grt"; hover = "K"; nextDiagnostic = null; # ]d openDiagnosticFloat = "d"; - renameSymbol = "rn"; + renameSymbol = "grn"; documentHighlight = null; listDocumentSymbols = null; listImplementations = null; @@ -83,6 +85,14 @@ treesitter = { enable = true; addDefaultGrammars = true; + # this is buggy and keybind.nix overwrites its keymaps anyways + incrementalSelection.enable = false; + mappings.incrementalSelection = { + decrementByNode = null; + incrementByNode = null; + incrementByScope = null; + init = null; + }; }; debugger.nvim-dap = { enable = true; diff --git a/modules/neovim/keybind.nix b/modules/neovim/keybind.nix index 2b4a4d2e9d0d4ed45410e2e32772523504c6a7bc..39e784e70c9acf8da9d6439c2e9514ab11ec0321 100644 --- a/modules/neovim/keybind.nix +++ b/modules/neovim/keybind.nix @@ -40,6 +40,7 @@ in # subtle nice features visual-dedent = keyRemap "v" "<" "" ">gv"; # keep selection + visual-overwrite = keyRemap "v" "p" "pgvygv"; # re-yank text clear-search-highlights = keyRemap "n" "" ":noh"; }; diff --git a/users/clover/home.nix b/users/clover/home.nix index 3fddc2063a6495e1d9f47399a919fab8a7d40728..bc04b2add219883c50129b85a848680cad2ae8a9 100644 --- a/users/clover/home.nix +++ b/users/clover/home.nix @@ -69,6 +69,10 @@ in shellAliases = { switch = "nh darwin switch ~/config"; + gg = "lazygit"; + ga = "git add"; + g = "git status"; + gp = "git pull --rebase && git push"; }; profileExtra = '' function python() { -- 2.54.0 From 3775459d8eeb491011f3143b472d295f1fb20868 Mon Sep 17 00:00:00 2001 From: chloe caruso Date: Thu, 21 Aug 2025 15:44:17 -0700 Subject: [PATCH 07/24] tweak code action window i've found previews dont work for ts lsp, so they're kind of silly to have. instead it will open a smaller window. --- modules/neovim/keybind.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/neovim/keybind.nix b/modules/neovim/keybind.nix index 39e784e70c9acf8da9d6439c2e9514ab11ec0321..bcb6b2e023d3c598e687e1758e0f1be09b9c833c 100644 --- a/modules/neovim/keybind.nix +++ b/modules/neovim/keybind.nix @@ -35,7 +35,7 @@ in # lsp code-action = keyCmd "n" "ca" - "FzfLua lsp_code_actions winopts.height=15 winopts.backdrop=100 winopts.title=false winopts.preview.title=false winopts.row=1"; + "FzfLua lsp_code_actions winopts.height=8 winopts.width=50 winopts.backdrop=100 winopts.title=false winopts.preview.title=false winopts.row=1 winopts.preview.hidden=true"; # subtle nice features visual-dedent = keyRemap "v" "<" " Date: Thu, 21 Aug 2025 23:29:56 -0700 Subject: [PATCH 08/24] chore: update flake inputs motivation for this was to resolve an evaluation warning, as well as hopefully get a copy of nixpkgs with ffmpeg svtav1 (with hydra builds) --- flake.lock | 137 ++++++++++++++-------------- flake.nix | 1 - users/fish/cattop/configuration.nix | 8 +- 3 files changed, 68 insertions(+), 78 deletions(-) diff --git a/flake.lock b/flake.lock index 732953dd0e5b25b7b3b6f22321f7098e4c4bd061..f0dbb9d1b89b326a865764b2c31c27cf9f18ecfb 100644 --- a/flake.lock +++ b/flake.lock @@ -9,11 +9,11 @@ ] }, "locked": { - "lastModified": 1754511800, - "narHash": "sha256-/gYkj4dbzcAV1EWJYy+2ryHGtC57jhIrRwSGQKCT8Gk=", + "lastModified": 1755807717, + "narHash": "sha256-x/IcOa+p9VFYlwXmuNhbZ8ce9As24rqy6uABv+tKacU=", "owner": "tadfisher", "repo": "android-nixpkgs", - "rev": "5bb0f6e7b112c7be7895c6058925c29db360b205", + "rev": "4316f29f7f3b34c41f2639ae190022fbed60b850", "type": "github" }, "original": { @@ -58,11 +58,11 @@ ] }, "locked": { - "lastModified": 1751313918, - "narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=", + "lastModified": 1755825449, + "narHash": "sha256-XkiN4NM9Xdy59h69Pc+Vg4PxkSm9EWl6u7k6D5FZ5cM=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf", + "rev": "8df64f819698c1fee0c2969696f54a843b2231e8", "type": "github" }, "original": { @@ -96,17 +96,17 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" + "lastModified": 1751685974, + "narHash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=", + "ref": "refs/heads/main", + "rev": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1", + "revCount": 92, + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" }, "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" } }, "flake-compat_2": { @@ -125,6 +125,22 @@ "type": "github" } }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -133,11 +149,11 @@ ] }, "locked": { - "lastModified": 1753121425, - "narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=", + "lastModified": 1754487366, + "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "644e0fc48951a860279da645ba77fe4a6e814c5e", + "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", "type": "github" }, "original": { @@ -201,27 +217,6 @@ } }, "flake-utils_4": { - "inputs": { - "systems": [ - "nvf", - "systems" - ] - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_5": { "inputs": { "systems": "systems_5" }, @@ -239,7 +234,7 @@ "type": "github" } }, - "flake-utils_6": { + "flake-utils_5": { "inputs": { "systems": "systems_6" }, @@ -257,7 +252,7 @@ "type": "github" } }, - "flake-utils_7": { + "flake-utils_6": { "inputs": { "systems": "systems_7" }, @@ -319,11 +314,11 @@ ] }, "locked": { - "lastModified": 1753943136, - "narHash": "sha256-eiEE5SabVcIlGSTRcRyBjmJMaYAV95SJnjy8YSsVeW4=", + "lastModified": 1755810213, + "narHash": "sha256-QdenO8f0PTg+tC6HuSvngKcbRZA5oZKmjUT+MXKOLQg=", "owner": "nix-community", "repo": "home-manager", - "rev": "bd82507edd860c453471c46957cbbe3c9fd01b5c", + "rev": "6911d3e7f475f7b3558b4f5a6aba90fa86099baa", "type": "github" }, "original": { @@ -368,11 +363,11 @@ ] }, "locked": { - "lastModified": 1753293216, - "narHash": "sha256-4hAm9PYNHAsR3MxH8MhSZt7mTiR8MlhyQilLJEPdaZs=", + "lastModified": 1754439168, + "narHash": "sha256-NcwRidwb/ask65LE86os4RkhyoPQo5sLu0sJs/NboK4=", "owner": "moonlight-mod", "repo": "moonlight", - "rev": "297a1b57c14ff18890382b2fe89f493ba349a730", + "rev": "66b81b113afd6654a88c9adb7edb7fe92839fe84", "type": "github" }, "original": { @@ -388,11 +383,11 @@ ] }, "locked": { - "lastModified": 1753589988, - "narHash": "sha256-y1JlcMB2dKFkrr6g+Ucmj8L//IY09BtSKTH/A7OU7mU=", + "lastModified": 1755404379, + "narHash": "sha256-Q6ZxZDBmD/B988Jjbx7/NchxOKIpOKBBrx9Yb0zMzpQ=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "f0736b09c43028fd726fb70c3eb3d1f0795454cf", + "rev": "ebbc1c05f786ae39bb5e04e57bf2c10c44a649e3", "type": "github" }, "original": { @@ -439,11 +434,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1753694789, - "narHash": "sha256-cKgvtz6fKuK1Xr5LQW/zOUiAC0oSQoA9nOISB0pJZqM=", + "lastModified": 1755615617, + "narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "dc9637876d0dcc8c9e5e22986b857632effeb727", + "rev": "20075955deac2583bb12f07151c2df830ef346b4", "type": "github" }, "original": { @@ -486,8 +481,8 @@ }, "nvf": { "inputs": { + "flake-compat": "flake-compat", "flake-parts": "flake-parts", - "flake-utils": "flake-utils_4", "mnw": "mnw", "nixpkgs": [ "nixpkgs" @@ -495,11 +490,11 @@ "systems": "systems_4" }, "locked": { - "lastModified": 1754043154, - "narHash": "sha256-Q47BVxwocPZ1GEDs6gKGH00eso74i0gTEPNuF8Kj0T8=", + "lastModified": 1755843058, + "narHash": "sha256-oAajTGcyTzuND7AAlaRXO+wF7ytAMOnrE4sYUjRonB8=", "owner": "notashelf", "repo": "nvf", - "rev": "69659e078b6531698255deda280c9407b34e29ea", + "rev": "d36996c8ba5c8d68b5def1b660e06d281ef0a3a8", "type": "github" }, "original": { @@ -545,11 +540,11 @@ ] }, "locked": { - "lastModified": 1753930086, - "narHash": "sha256-Os6Ta5zamfAllmQNlvkbGZLHn06zJy3hVXRk+Dy2yMo=", + "lastModified": 1755830208, + "narHash": "sha256-fMa/Hcg+4O2h+kl3gNPjtGSWPI8NtCl3LYMsejK6qGA=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "17b672c10c1798696a516cb879edbc2ebd0f58a4", + "rev": "802a7b97f8ff672ba2dec70c9e354f51f844e796", "type": "github" }, "original": { @@ -754,11 +749,11 @@ ] }, "locked": { - "lastModified": 1753676490, - "narHash": "sha256-XeifEftxYGP/gzp6O1yO1S1W+MEx4Xvrgeu84ryRPNQ=", + "lastModified": 1754886070, + "narHash": "sha256-MZDmxOkVKL1HY72bliN8Gxh0SYkHUa3W/1fTU2ke36I=", "owner": "youwen5", "repo": "zen-browser-flake", - "rev": "77024f4557204bb4d526893d42db2e6f50727fab", + "rev": "e37d2b326311320c8571111b3ef89b29d26d4b64", "type": "github" }, "original": { @@ -769,16 +764,16 @@ }, "zig": { "inputs": { - "flake-compat": "flake-compat", - "flake-utils": "flake-utils_5", + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils_4", "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1753963984, - "narHash": "sha256-JPiCLZHuNk11XYYCqoLoKYIgdUu2WpNccTzl4ljycTQ=", + "lastModified": 1755605615, + "narHash": "sha256-J0Cxren2QLeI0ZvRZw4XGcMm4q3uPIZHM+eJnaZfXX8=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "45772b76cdb103bd300abac4a85a34518dee65a0", + "rev": "714fae26049a263ff2e4641ce7c973f371f4b005", "type": "github" }, "original": { @@ -789,8 +784,8 @@ }, "zig-overlay": { "inputs": { - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_7", + "flake-compat": "flake-compat_3", + "flake-utils": "flake-utils_6", "nixpkgs": [ "zls", "nixpkgs" @@ -812,7 +807,7 @@ }, "zls": { "inputs": { - "flake-utils": "flake-utils_6", + "flake-utils": "flake-utils_5", "gitignore": "gitignore_2", "langref": "langref", "nixpkgs": "nixpkgs_4", diff --git a/flake.nix b/flake.nix index 72d7e578f967a98211741e1bb0bdb35eab8fef16..28101b0755d19ad6d382be93307cd255f30fc903 100644 --- a/flake.nix +++ b/flake.nix @@ -91,7 +91,6 @@ mkSystem = import ./lib/mkSystem.nix { inherit inputs mkNeovim overlays; }; in rec { - inherit self; # "nix fmt" formatter = forAllSystems (inputs: inputs.pkgs.autofmt); packages = forAllSystems ( diff --git a/users/fish/cattop/configuration.nix b/users/fish/cattop/configuration.nix index 8784eed1e591c1813bc90abd2bd63ae4cb2a2a24..66a59ef768a47e068342959655076b7c5807933f 100644 --- a/users/fish/cattop/configuration.nix +++ b/users/fish/cattop/configuration.nix @@ -1,14 +1,10 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - { - config, - lib, pkgs, ... }: - { imports = [ # Include the results of the hardware scan. @@ -42,8 +38,8 @@ services.xserver.enable = true; # Enable the GNOME Desktop Environment. - services.xserver.displayManager.gdm.enable = true; - services.xserver.desktopManager.gnome.enable = true; + services.displayManager.gdm.enable = true; + services.desktopManager.gnome.enable = true; environment.gnome.excludePackages = ( with pkgs; [ -- 2.54.0 From cb1d7ea523fa7624165ef4da88961e12e886f456 Mon Sep 17 00:00:00 2001 From: chloe caruso Date: Fri, 22 Aug 2025 00:48:01 -0700 Subject: [PATCH 09/24] fix: completions menu closes #7 --- lib/mkNeovim.nix | 26 ++++++++++++---------- modules/neovim/blink-cmp.nix | 32 +++++++++++++++++++++++++++ modules/neovim/default.nix | 43 +++++------------------------------- modules/neovim/extra.lua | 2 ++ modules/neovim/keybind.nix | 2 +- 5 files changed, 55 insertions(+), 50 deletions(-) create mode 100644 modules/neovim/blink-cmp.nix create mode 100644 modules/neovim/extra.lua diff --git a/lib/mkNeovim.nix b/lib/mkNeovim.nix index c0e0c70e832de6bd998898eb5db7a71f3b2a495c..d638598ee58e0b5d0d50fb7bed98c8a54181ff43 100644 --- a/lib/mkNeovim.nix +++ b/lib/mkNeovim.nix @@ -10,16 +10,18 @@ let userDir = ../users + "/${user}"; userConfig = import (userDir + "/user.nix"); + + config = inputs.nvf.lib.neovimConfiguration { + inherit pkgs; + modules = builtins.filter (f: f != null) [ + (../users + ("/" + user + "/vim.nix")) + ../modules/neovim + ]; + extraSpecialArgs = { + inherit host; + flake = self; + user = userConfig; + }; + }; in -(inputs.nvf.lib.neovimConfiguration { - inherit pkgs; - modules = builtins.filter (f: f != null) [ - (../users + ("/" + user + "/vim.nix")) - ../modules/neovim - ]; - extraSpecialArgs = { - inherit host; - flake = self; - user = userConfig; - }; -}).neovim +config.neovim // { input = config; } diff --git a/modules/neovim/blink-cmp.nix b/modules/neovim/blink-cmp.nix new file mode 100644 index 0000000000000000000000000000000000000000..1b186a410979096011b25e83b6ed310ac3217a5a --- /dev/null +++ b/modules/neovim/blink-cmp.nix @@ -0,0 +1,32 @@ +{ ... }: +{ + vim.autocomplete.blink-cmp = { + enable = true; + mappings = { + close = null; + complete = null; + confirm = null; + next = null; + previous = null; + scrollDocsDown = null; + scrollDocsUp = null; + }; + setupOpts = { + keymap = { + preset = "super-tab"; + }; + completion = { + ghost_text.enabled = false; + list.selection.preselect = true; + trigger = { + show_in_snippet = true; + }; + }; + signature.enabled = true; + }; + sourcePlugins = { + ripgrep.enable = true; + }; + friendly-snippets.enable = true; + }; +} diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index 5d9d90eb73d8689599da9d3a966155f48f6c923f..9d73ffbd1bd956c91ffe2c56b6b6e14a9164381a 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -9,6 +9,7 @@ ./formatter.nix ./keybind.nix ./options.nix + ./blink-cmp.nix ]; # based on default options from upstream: # https://github.com/NotAShelf/nvf/blob/main/configuration.nix @@ -22,12 +23,10 @@ extraLuaFiles = [ ./commands/FullscreenTerm.lua ./commands/SmartQuit.lua + + ./extra.lua ]; - - theme = { - enable = true; - }; - + theme.enable = true; visuals = { # notification system # https://github.com/j-hui/fidget.nvim @@ -110,8 +109,6 @@ clang.enable = true; css.enable = true; html.enable = true; - lua.enable = true; - markdown.enable = true; nix.enable = true; python.enable = true; rust.crates.enable = true; @@ -119,6 +116,8 @@ ts.enable = true; zig.enable = true; # sort-lines: off + + nix.lsp.servers = "nixd"; }; filetree.neo-tree = { enable = true; @@ -149,36 +148,6 @@ }; }; }; - autocomplete.blink-cmp = { - enable = true; - mappings = { - close = null; - complete = null; - confirm = null; - next = null; - previous = null; - scrollDocsDown = null; - scrollDocsUp = null; - }; - setupOpts = { - keymap = { - preset = "super-tab"; - }; - completion = { - ghost_text.enabled = false; - list.selection.preselect = true; - trigger = { - show_in_snippet = true; - }; - accept.auto_brackets.enabled = true; - }; - signature.enabled = true; - }; - sourcePlugins = { - ripgrep.enable = true; - }; - friendly-snippets.enable = true; - }; statusline = { lualine = { enable = true; diff --git a/modules/neovim/extra.lua b/modules/neovim/extra.lua new file mode 100644 index 0000000000000000000000000000000000000000..8c91ba429eee35837cccebeb6c2537d479f34e1d --- /dev/null +++ b/modules/neovim/extra.lua @@ -0,0 +1,2 @@ +-- not sure how to add this in nix +require("fzf-lua").register_ui_select() diff --git a/modules/neovim/keybind.nix b/modules/neovim/keybind.nix index bcb6b2e023d3c598e687e1758e0f1be09b9c833c..a57c35d5f235e7ea0539815b5e399c5d97e1372a 100644 --- a/modules/neovim/keybind.nix +++ b/modules/neovim/keybind.nix @@ -35,7 +35,7 @@ in # lsp code-action = keyCmd "n" "ca" - "FzfLua lsp_code_actions winopts.height=8 winopts.width=50 winopts.backdrop=100 winopts.title=false winopts.preview.title=false winopts.row=1 winopts.preview.hidden=true"; + "FzfLua lsp_code_actions winopts.height=8 winopts.width=50 winopts.backdrop=100 winopts.title=false winopts.preview.title=false winopts.row=1 winopts.preview.hidden=true silent=true"; # subtle nice features visual-dedent = keyRemap "v" "<" " Date: Fri, 22 Aug 2025 00:55:57 -0700 Subject: [PATCH 10/24] feat: enable undotree (not customized) --- modules/neovim/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index 9d73ffbd1bd956c91ffe2c56b6b6e14a9164381a..5b77121e207ce4221c99bedb4300abd1fc5335ef 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -181,6 +181,7 @@ gitsigns.enable = true; gitsigns.codeActions.enable = false; # throws an annoying debug message }; + utility.undotree.enable = true; # Better help docs lazy.plugins."helpview.nvim" = { enabled = true; -- 2.54.0 From 6685dd8e70c72853ef29acb217082ade33ab5ae0 Mon Sep 17 00:00:00 2001 From: chloe caruso Date: Fri, 22 Aug 2025 11:53:52 -0700 Subject: [PATCH 11/24] chore: move shell settings into default --- modules/home/default.nix | 18 +++++++++++------- modules/neovim/blink-cmp.nix | 3 ++- modules/neovim/default.nix | 2 ++ users/clover/home.nix | 7 ------- users/natalie/home.nix | 16 +++++++++------- 5 files changed, 24 insertions(+), 22 deletions(-) diff --git a/modules/home/default.nix b/modules/home/default.nix index bc3a5ebfd3c15f9d93ab6737cf29b830661a7fa6..09ddaee898e5e9bfc907f4e79de87ce51af4f6ad 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -120,16 +120,20 @@ in inherit (pkgs.fishPlugins.bang-bang) src; } ]; - shellAliases = { - } - // lib.optionalAttrs (!host.darwin) { - reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now"; - }; shellInit = '' - batman --export-env | source - test -r '/Users/${user.username}/.opam/opam-init/init.fish' && source '/Users/${user.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true + if type -q batman + batman --export-env | source + end + test -r "$HOME"'/.opam/opam-init/init.fish' && source "$HOME"'/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true ''; }; + zsh = { + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + autocd = true; + history.size = 10000; + }; ghostty.settings.custom-shader = lib.mkIf ( cfg.ghostty.shader != null diff --git a/modules/neovim/blink-cmp.nix b/modules/neovim/blink-cmp.nix index 1b186a410979096011b25e83b6ed310ac3217a5a..6a3d3fa5a026978eace2dc92bb576d2067f2849e 100644 --- a/modules/neovim/blink-cmp.nix +++ b/modules/neovim/blink-cmp.nix @@ -1,4 +1,4 @@ -{ ... }: +{ lib, ... }: { vim.autocomplete.blink-cmp = { enable = true; @@ -14,6 +14,7 @@ setupOpts = { keymap = { preset = "super-tab"; + "" = [ "show" ]; }; completion = { ghost_text.enabled = false; diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index 5b77121e207ce4221c99bedb4300abd1fc5335ef..f982fab390bef61b56284ceb5d8d92281adfc658 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -125,10 +125,12 @@ enable_cursor_hijack = true; git_status_async = true; close_if_last_window = true; + window.width = 30; filesystem.filtered_items = { # dotfiles are often used for project configuration hide_dotfiles = false; never_show = [ + ".git" ".DS_Store" # macOS "thumbs.db" # Windows ]; diff --git a/users/clover/home.nix b/users/clover/home.nix index bc04b2add219883c50129b85a848680cad2ae8a9..d256187bcf86ecfef122a919c5a267b79cf1739d 100644 --- a/users/clover/home.nix +++ b/users/clover/home.nix @@ -52,7 +52,6 @@ in theme = "light:catppuccin-latte,dark:catppuccin-macchiato"; font-family = "AT Name Mono"; adjust-cursor-thickness = 1; - minimum-contrast = 1.1; background-opacity = 0.9; background-blur = true; }; @@ -61,12 +60,6 @@ in # zsh is the shell i use zsh = { enable = true; - enableCompletion = true; - autosuggestion.enable = true; - syntaxHighlighting.enable = true; - - history.size = 10000; - shellAliases = { switch = "nh darwin switch ~/config"; gg = "lazygit"; diff --git a/users/natalie/home.nix b/users/natalie/home.nix index eba325355da35fbd28c3c131b199f88746ae78da..9ebe9cb33bcbb2f273c69d43cf1c6feb7313b207 100644 --- a/users/natalie/home.nix +++ b/users/natalie/home.nix @@ -1,11 +1,5 @@ +{ lib, host, ... }@args: { - pkgs, - lib, - options, - ... -}@args: -{ - programs = { # sort-lines:start atuin.enable = true; @@ -17,6 +11,14 @@ lsd.enable = true; android-sdk.enable = true; # sort-lines:end + + fish = { + shellAliases = + { } + // lib.optionalAttrs (!host.darwin) { + reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now"; + }; + }; }; home.packages = import ./packages.nix args; -- 2.54.0 From 108bc9517b04869355dbfba26ab050f032d44d11 Mon Sep 17 00:00:00 2001 From: Fish <77413091+JulianBarbera@users.noreply.github.com> Date: Sat, 23 Aug 2025 20:17:47 -0700 Subject: [PATCH 12/24] update fish config --- users/fish/cattop/configuration.nix | 12 ++++++++++-- users/fish/vim.nix | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/users/fish/cattop/configuration.nix b/users/fish/cattop/configuration.nix index 66a59ef768a47e068342959655076b7c5807933f..fa420bb270358ab6bb1c7fd1846638db7e024c6c 100644 --- a/users/fish/cattop/configuration.nix +++ b/users/fish/cattop/configuration.nix @@ -93,9 +93,17 @@ fish ]; }; - + programs.git = { + enable = true; + extraConfig = { + push = { + autoSetupRemote = true; + }; + }; + }; programs.firefox.enable = true; - programs.neovim.defaultEditor.enable = true; + programs.neovim.enable = true; + #programs.neovim.defaultEditor.enable = true; # List packages installed in system profile. # You can use https://search.nixos.org/ to find more packages (and options). diff --git a/users/fish/vim.nix b/users/fish/vim.nix index 52c14b8cbb66a4eb826a85e044e9a453819720d1..80d61f494d953950672d228d2d0e6a78e541999d 100644 --- a/users/fish/vim.nix +++ b/users/fish/vim.nix @@ -1,3 +1,4 @@ { ... }: { + vim.languages.svelte.enable = true; } -- 2.54.0 From cf37c5191b1545f4832c9d599cc4c03ded15496f Mon Sep 17 00:00:00 2001 From: Fish <77413091+JulianBarbera@users.noreply.github.com> Date: Sat, 30 Aug 2025 22:14:23 -0700 Subject: [PATCH 13/24] Enabled fish --- users/fish/cattop/configuration.nix | 13 ++++++++----- users/fish/cattop/home.nix | 23 +++++++++++++---------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/users/fish/cattop/configuration.nix b/users/fish/cattop/configuration.nix index fa420bb270358ab6bb1c7fd1846638db7e024c6c..78af13bf3caa7a42e46288a964b0256d2ea453d5 100644 --- a/users/fish/cattop/configuration.nix +++ b/users/fish/cattop/configuration.nix @@ -81,6 +81,7 @@ # Define a user account. Don't forget to set a password with ‘passwd’. users.users.fish = { isNormalUser = true; + shell = pkgs.fish; extraGroups = [ "wheel" # Enable ‘sudo’ for the user. "dialout" # Enable serial access for the user. @@ -95,12 +96,13 @@ }; programs.git = { enable = true; - extraConfig = { - push = { - autoSetupRemote = true; - }; - }; + # extraConfig = { + # push = { + # autoSetupRemote = true; + # }; + # }; }; + programs.firefox.enable = true; programs.neovim.enable = true; #programs.neovim.defaultEditor.enable = true; @@ -114,6 +116,7 @@ # Some programs need SUID wrappers, can be configured further or are # started in user sessions. + programs.fish.enable = true; programs.mtr.enable = true; programs.gnupg.agent = { enable = true; diff --git a/users/fish/cattop/home.nix b/users/fish/cattop/home.nix index b6c57b95e5cb64e35358d29a20134960a543f379..1ca54a9b2c1c20c735e65d97826151cc3ebecc1d 100644 --- a/users/fish/cattop/home.nix +++ b/users/fish/cattop/home.nix @@ -1,13 +1,4 @@ -{ - inputs, - config, - pkgs, - lib, - userSettings, - systemSettings, - ... -}: - +{ pkgs, ... }: { home = { stateVersion = "23.05"; # Don't change this unless upgrading Home Manager versions @@ -54,6 +45,7 @@ programs = { btop.enable = true; + fish.enable = true; hyfetch.enable = true; gh = { @@ -61,6 +53,17 @@ gitCredentialHelper.enable = true; }; + ghostty = { + enable = true; + shader = "cursor-smear-black.glsl"; + settings = { + theme = "citruszest"; + adjust-cursor-thickness = 1; + background-opacity = 0.9; + background-blur = true; + }; + }; + # Uncomment if you want to use MangoHud system-wide # mangohud.enable = true; }; -- 2.54.0 From 852b4fdd53e8d4b18f02ccb1f72f66f1c4d4ee07 Mon Sep 17 00:00:00 2001 From: Julia <77413091+JulianBarbera@users.noreply.github.com> Date: Sun, 31 Aug 2025 16:54:23 -0700 Subject: [PATCH 14/24] Added gnome packages to exclude --- users/fish/cattop/configuration.nix | 85 +++++++++++++---------------- users/fish/cattop/home.nix | 25 +++------ users/fish/user.nix | 2 +- 3 files changed, 48 insertions(+), 64 deletions(-) diff --git a/users/fish/cattop/configuration.nix b/users/fish/cattop/configuration.nix index 78af13bf3caa7a42e46288a964b0256d2ea453d5..b93180c6c3305e5f391db8139de7383536e597be 100644 --- a/users/fish/cattop/configuration.nix +++ b/users/fish/cattop/configuration.nix @@ -7,65 +7,66 @@ }: { imports = [ - # Include the results of the hardware scan. ./hardware-configuration.nix ]; - # Use the systemd-boot EFI boot loader. boot.loader.efi.canTouchEfiVariables = true; - # networking.hostName = "nixos"; # Define your hostname. - # Pick only one of the below networking options. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + networking.hostName = "cattop"; # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. # Set your time zone. - # time.timeZone = "Europe/Amsterdam"; + Time.timeZone = "America/Los_Angeles"; - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Select internationalisation properties. - # i18n.defaultLocale = "en_US.UTF-8"; - # console = { - # font = "Lat2-Terminus16"; - # keyMap = "us"; - # useXkbConfig = true; # use xkb.options in tty. - # }; - - # Enable the X11 windowing system. services.xserver.enable = true; - # Enable the GNOME Desktop Environment. services.displayManager.gdm.enable = true; services.desktopManager.gnome.enable = true; environment.gnome.excludePackages = ( with pkgs; [ - atomix - cheese + adwaita-fonts + adwaita-icon-theme + baobab + decibels epiphany + evince + file-roller geary - gedit + gnome-backgrounds + gnome-calculator + gnome-calendar gnome-characters + gnome-clocks + gnome-connections + gnome-console + gnome-contacts + gnome-disk-utility + gnome-font-viewer + gnome-logs + gnome-maps gnome-music - gnome-photos - gnome-terminal + gnome-shell-extensions + gnome-system-monitor + gnome-screenshot + gnome-text-editor + gnome-themes-extra gnome-tour - hitori - iagno + gnome-user-docs + gnome-weather + loupe + nautilus + orca + seahorse + simple-scan + snapshot + sushi totem - + yelp ] ); - # Configure keymap in X11 - # services.xserver.xkb.layout = "us"; - # services.xserver.xkb.options = "eurosign:e,caps:escape"; - - # Enable CUPS to print documents. - # services.printing.enable = true; + services.printing.enable = true; # Enable sound. # services.pulseaudio.enable = true; @@ -78,13 +79,12 @@ # Enable touchpad support (enabled default in most desktopManager). # services.libinput.enable = true; - # Define a user account. Don't forget to set a password with ‘passwd’. users.users.fish = { isNormalUser = true; shell = pkgs.fish; extraGroups = [ - "wheel" # Enable ‘sudo’ for the user. - "dialout" # Enable serial access for the user. + "wheel" + "dialout" ]; packages = with pkgs; [ tree @@ -108,14 +108,11 @@ #programs.neovim.defaultEditor.enable = true; # List packages installed in system profile. - # You can use https://search.nixos.org/ to find more packages (and options). environment.systemPackages = with pkgs; [ - vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + vim wget ]; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. programs.fish.enable = true; programs.mtr.enable = true; programs.gnupg.agent = { @@ -128,12 +125,6 @@ # Enable the OpenSSH daemon. # services.openssh.enable = true; - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - # Copy the NixOS configuration file and link it from the resulting system # (/run/current-system/configuration.nix). This is useful in case you # accidentally delete configuration.nix. diff --git a/users/fish/cattop/home.nix b/users/fish/cattop/home.nix index 1ca54a9b2c1c20c735e65d97826151cc3ebecc1d..fee99c66087e20c50a769208497aad0e37d8c6ac 100644 --- a/users/fish/cattop/home.nix +++ b/users/fish/cattop/home.nix @@ -6,17 +6,15 @@ packages = with pkgs; [ # General applications ghostty - stremio - julia - calibre - mpv signal-desktop - python3 - gh spotify + inputs.zen-browser.packages.x86_64-linux.default + legcord # Gaming (prismlauncher.override { gamemodeSupport = true; }) + bsdgames + space-cadet-pinball # System & desktop tools wofi @@ -28,18 +26,16 @@ ethtool grub2 efibootmgr - distrobox pqiv + imagemagick # Dev tools - legcord hyfetch - kicad + python3 + gh + cmake # Unsorted - ripgrep - busybox - imagemagick ]; }; @@ -59,12 +55,9 @@ settings = { theme = "citruszest"; adjust-cursor-thickness = 1; - background-opacity = 0.9; + background-opacity = 0.95; background-blur = true; }; }; - - # Uncomment if you want to use MangoHud system-wide - # mangohud.enable = true; }; } diff --git a/users/fish/user.nix b/users/fish/user.nix index 5d8338389ba3f2abd622dc14d693e60fb71c5156..ed9ab2ccd80dd7db9b1a9d6d20c536e028b63c49 100644 --- a/users/fish/user.nix +++ b/users/fish/user.nix @@ -4,7 +4,7 @@ rec { email = "77413091+JulianBarbera@users.noreply.github.com"; # email (used for certain configurations) dotfilesDir = "~/config"; # absolute path of the local repo theme = "catppuccin-mocha"; # name of theme that stylix will use - browser = "firefox"; # Default browser; must select one from ./user/app/browser/ + browser = "zen-browser"; # Default browser; must select one from ./user/app/browser/ term = "ghostty"; # Default terminal command; font = "iosevka"; # Selected font editor = "neovim"; # Default editor; -- 2.54.0 From 27868a5a06e85240e79662164b9be89c1e683fdc Mon Sep 17 00:00:00 2001 From: clover caruso Date: Sun, 31 Aug 2025 21:30:48 -0700 Subject: [PATCH 15/24] chloe: change ghostty theme --- users/clover/home.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/clover/home.nix b/users/clover/home.nix index d256187bcf86ecfef122a919c5a267b79cf1739d..5ebf066d1c06a405cd19d06fca99618d6a85738f 100644 --- a/users/clover/home.nix +++ b/users/clover/home.nix @@ -49,7 +49,7 @@ in shader = "cursor-smear-black.glsl"; package = null; settings = { - theme = "light:catppuccin-latte,dark:catppuccin-macchiato"; + theme = "light:farmhouse-light,dark:ChallengerDeep"; font-family = "AT Name Mono"; adjust-cursor-thickness = 1; background-opacity = 0.9; -- 2.54.0 From 45482ab529279dbbd47b87a9603ebd2e129f01ff Mon Sep 17 00:00:00 2001 From: clover caruso Date: Sun, 31 Aug 2025 21:30:48 -0700 Subject: [PATCH 16/24] add jujutsu --- modules/home/default.nix | 22 ++++++++++++++++++++++ modules/neovim/default.nix | 1 + users/clover/home.nix | 2 ++ 3 files changed, 25 insertions(+) diff --git a/modules/home/default.nix b/modules/home/default.nix index 09ddaee898e5e9bfc907f4e79de87ce51af4f6ad..38811b880fb60af75ae564d2ba787a1a7c7f2dd7 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -77,6 +77,7 @@ in # ViM and Neovim ".*.swp" ".nvimlog" + ".jj" ]; }; @@ -134,6 +135,27 @@ in autocd = true; history.size = 10000; }; + jujutsu = { + settings = { + user = { + email = config.programs.git.userEmail; + name = config.programs.git.userName; + }; + signing = { + behavior = "own"; + backend = "ssh"; + key = "~/.ssh/id_ed25519.pub"; + }; + git = { + sign-on-push = true; + push-new-bookmarks = true; + }; + ui = { + default-command = "log"; + pager = "${pkgs.bat}/bin/bat --style=plain"; + }; + }; + }; ghostty.settings.custom-shader = lib.mkIf ( cfg.ghostty.shader != null diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index f982fab390bef61b56284ceb5d8d92281adfc658..6a31c91a848672da9814e0b6bd9e5c5ad48a29f8 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -131,6 +131,7 @@ hide_dotfiles = false; never_show = [ ".git" + ".jj" ".DS_Store" # macOS "thumbs.db" # Windows ]; diff --git a/users/clover/home.nix b/users/clover/home.nix index 5ebf066d1c06a405cd19d06fca99618d6a85738f..de5840b081b97253c5991ee78fac02dba651a767 100644 --- a/users/clover/home.nix +++ b/users/clover/home.nix @@ -81,6 +81,8 @@ in # use a git-specific email git.userEmail = "git@paperclover.net"; + jujutsu.enable = true; + ssh = { enable = true; matchBlocks = rec { -- 2.54.0 From 617dc280cb05d0d59c1e936d93e2d7bbe97cab65 Mon Sep 17 00:00:00 2001 From: clover caruso Date: Mon, 1 Sep 2025 12:37:58 -0700 Subject: [PATCH 17/24] clover: remove chromium from laptop installation --- users/clover/paperback/configuration.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/users/clover/paperback/configuration.nix b/users/clover/paperback/configuration.nix index 3d94126693f8ab3136a138d8b013d6491e67fee4..33d6590bbae174414152184a49ac07e49f4204a8 100644 --- a/users/clover/paperback/configuration.nix +++ b/users/clover/paperback/configuration.nix @@ -2,7 +2,6 @@ _: { homebrew = { enable = true; casks = [ - "eloston-chromium" "db-browser-for-sqlite" ]; }; -- 2.54.0 From ab4ae993dcea0f05f4a2236a79370096be97debf Mon Sep 17 00:00:00 2001 From: clover caruso Date: Mon, 1 Sep 2025 12:37:58 -0700 Subject: [PATCH 18/24] clover: configure jujutsu log to look really nice so far, part of my strategy has been tagging incomplete commits with "WIP" and then renaming them once i'm ready to push them. here, the default log revset will just show all WIPs, and the custom display template will very clearly highlight them along with the usual conventional commit stuff. --- modules/home/default.nix | 6 ++ users/clover/home.nix | 185 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 190 insertions(+), 1 deletion(-) diff --git a/modules/home/default.nix b/modules/home/default.nix index 38811b880fb60af75ae564d2ba787a1a7c7f2dd7..64fbd631b34421db740a329ea8f752b863bf684d 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -152,6 +152,12 @@ in }; ui = { default-command = "log"; + diff-formatter = [ + "${pkgs.difftastic}/bin/difft" + "--color=always" + "$left" + "$right" + ]; pager = "${pkgs.bat}/bin/bat --style=plain"; }; }; diff --git a/users/clover/home.nix b/users/clover/home.nix index de5840b081b97253c5991ee78fac02dba651a767..363ad183b149b7a8458c18ac2840542d48f3782e 100644 --- a/users/clover/home.nix +++ b/users/clover/home.nix @@ -81,7 +81,190 @@ in # use a git-specific email git.userEmail = "git@paperclover.net"; - jujutsu.enable = true; + jujutsu = { + enable = true; + # my workflow is based on creating changes and editing them. while they + # are in progress the description starts with "WIP: " + settings = rec { + colors = { + bookmark = "green"; + bookmarks = colors.bookmark; + local_bookmarks = colors.bookmarks; + remote_bookmarks = colors.bookmark; + "working_copy bookmark" = "bright green"; + "working_copy bookmarks" = colors."working_copy bookmark"; + "working_copy local_bookmarks" = colors."working_copy bookmark"; + "working_copy remote_bookmarks" = colors."working_copy bookmark"; + + "author" = { + fg = "white"; + bold = false; + italic = true; + }; + "working_copy author" = colors.author; + + desc = { + bold = false; + fg = "bright white"; + }; + description = colors.desc; + cc_wip = { + fg = "bright yellow"; + bold = true; + reverse = true; + }; + cc_header = { + bold = true; + fg = "bright white"; + }; + cc_feat = "green"; + cc_fix = "red"; + cc_hotfix = "red"; + cc_chore = "yellow"; + cc_test = "blue"; + cc_other = "blue"; + cc_scope = { + fg = "cyan"; + bold = false; + italic = true; + }; + + active_marker = { + fg = "bright magenta"; + bold = true; + reverse = true; + }; + conflict_marker = { + fg = "bright red"; + bold = true; + reverse = true; + }; + + timestamp = "bright black"; + commit_id = { + fg = "bright black"; + bold = false; + }; + muted = "bright black"; + }; + ui.graph.style = "square"; + revsets = { + log = "ancestors(description(regex:\"^(WIP:|\\\\s*$)\"), 3) | ancestors(immutable_heads(), 2) | ancestors(visible_heads(), 2)"; + short-prefixes = "(trunk()..@)::"; + }; + templates.log = "hl_wip(self)"; + + template-aliases = { + # log template, highlighting the WIP commits by making everything else faded out + "hl_wip(commit)" = '' + if(commit.root(), format_root_commit(commit), + format_short_commit_header(commit) ++ "\n" ++ + format_commit_description(commit) + ) + ''; + + "format_commit_description(commit)" = '' + label("desc", format_commit_firstline(commit.description().first_line())) ++ + "\n" ++ if( + commit.description().starts_with("WIP:") || commit.current_working_copy(), + commit.description().remove_prefix(commit.description().first_line()).remove_prefix("\n").trim_end() ++ "\n ", + if(commit.description().remove_prefix(commit.description().first_line()).trim().len() > 0, + label("muted", lines_collapsed(commit.description().lines().filter(|x| x.trim().len() > 0).len() - 1)), + " " + ) + ) + ''; + "lines_collapsed(count)" = + ''("[" ++ stringify(count ++ " line" ++ if(count == 1, "", "s")) ++ " collapsed]\n")''; + "format_commit_firstline(line)" = '' + if(line.starts_with("WIP:"), + label("cc_wip", " WIP ") ++ " " ++ format_commit_firstline_a_wip(line.remove_prefix("WIP:").trim()), + format_commit_firstline_a_wip(line) + ) + ''; + "format_commit_firstline_a_wip(line)" = '' + if(line.starts_with("feat:") || line.starts_with("feat("), + label("cc_feat", "feat") ++ format_commit_firstline_a_cc_type(line.remove_prefix("feat")), + if(line.starts_with("fix:") || line.starts_with("fix("), + label("cc_fix", "fix") ++ format_commit_firstline_a_cc_type(line.remove_prefix("fix")), + if(line.starts_with("hotfix:") || line.starts_with("hotfix("), + label("cc_hotfix", "hotfix") ++ format_commit_firstline_a_cc_type(line.remove_prefix("hotfix")), + if(line.starts_with("chore:") || line.starts_with("chore("), + label("cc_chore", "chore") ++ format_commit_firstline_a_cc_type(line.remove_prefix("chore")), + if(line.starts_with("test:") || line.starts_with("test("), + label("cc_other", "test") ++ format_commit_firstline_a_cc_type(line.remove_prefix("test")), + if(line.starts_with("refactor:") || line.starts_with("refactor("), + label("cc_other", "refactor") ++ format_commit_firstline_a_cc_type(line.remove_prefix("refactor")), + if(line.starts_with("perf:") || line.starts_with("perf("), + label("cc_other", "perf") ++ format_commit_firstline_a_cc_type(line.remove_prefix("perf")), + if(line.starts_with("lib:") || line.starts_with("lib("), + label("cc_other", "lib") ++ format_commit_firstline_a_cc_type(line.remove_prefix("lib")), + label("cc_header", line) + )))))))) + ''; + "format_commit_firstline_a_cc_type(rest)" = '' + if(rest.starts_with("(") && rest.contains(")"), + format_firstline_cc_scope(rest, index_of_close_paren(rest)), + format_firstline_a_cc(rest)) + ''; + "format_firstline_cc_scope(rest, index)" = '' + label("cc_scope", rest.substr(0, index)) ++ format_firstline_a_cc(rest.substr(index, rest.len())) + ''; + "format_firstline_a_cc(rest)" = '' + if(rest.starts_with(":"), + label("muted", ":") ++ label("cc_header", rest.remove_prefix(":")), + label("cc_header", rest) + ) + ''; + # sorry! + "index_of_close_paren(line)" = '' + stringify(if(line.substr(1, 2) == ")", "A", + if(line.substr(2, 3) == ")", "AA", + if(line.substr(3, 4) == ")", "AAA", + if(line.substr(4, 5) == ")", "AAAA", + if(line.substr(5, 6) == ")", "AAAAA", + if(line.substr(6, 7) == ")", "AAAAAA", + if(line.substr(7, 8) == ")", "AAAAAAA", + if(line.substr(8, 9) == ")", "AAAAAAAA", + if(line.substr(9, 10) == ")","AAAAAAAAA", + if(line.substr(10, 11) == ")", "AAAAAAAAAA", + if(line.substr(11, 12) == ")", "AAAAAAAAAAA", + if(line.substr(12, 13) == ")", "AAAAAAAAAAAA", + if(line.substr(13, 14) == ")", "AAAAAAAAAAAAA", + if(line.substr(14, 15) == ")", "AAAAAAAAAAAAAA", + if(line.substr(15, 16) == ")", "AAAAAAAAAAAAAAA", + if(line.substr(16, 17) == ")", "AAAAAAAAAAAAAAAA", + if(line.substr(17, 18) == ")", "AAAAAAAAAAAAAAAAA", + if(line.substr(18, 19) == ")", "AAAAAAAAAAAAAAAAAA", + if(line.substr(19, 20) == ")", "AAAAAAAAAAAAAAAAAAA", + if(line.substr(20, 21) == ")", "AAAAAAAAAAAAAAAAAAAA", + "AAAAAAAAAAAAAAAAAAAAA" + ))))))))))))))))))))).len() + 1 + ''; + + "format_short_signature(signature)" = "signature.name()"; + "format_timestamp(timestamp)" = "timestamp.ago()"; + "format_short_commit_header(commit)" = '' + separate(" ", + if(commit.current_working_copy(), label("active_marker", " ACTIVE ")), + if(commit.conflict(), label("conflict_marker", " CONFLICT ")), + format_short_change_id_with_hidden_and_divergent_info(commit), + format_short_signature(commit.author()), + label("muted", "|"), + if(commit.description().trim().len() > 0, label("muted", format_timestamp(commit_timestamp(commit)))), + commit.bookmarks(), + commit.tags(), + commit.working_copies(), + label("muted", "(") ++ + format_short_commit_id(commit.commit_id()) ++ + label("muted", ")"), + if(config("ui.show-cryptographic-signatures").as_boolean(), + format_short_cryptographic_signature(commit.signature())), + ) + ''; + }; + }; + }; ssh = { enable = true; -- 2.54.0 From 5f1d042056d5926ca5f1e98920a2148aacc7adce Mon Sep 17 00:00:00 2001 From: Fish <77413091+JulianBarbera@users.noreply.github.com> Date: Sun, 7 Sep 2025 22:45:11 -0700 Subject: [PATCH 19/24] Updates for OS reinstall --- users/fish/cattop/configuration.nix | 6 --- users/fish/cattop/hardware-configuration.nix | 48 +++++++------------- users/fish/cattop/home.nix | 4 +- 3 files changed, 18 insertions(+), 40 deletions(-) diff --git a/users/fish/cattop/configuration.nix b/users/fish/cattop/configuration.nix index b93180c6c3305e5f391db8139de7383536e597be..d455b262b7dd5253e88736b7c0d5f55cfb9a5e78 100644 --- a/users/fish/cattop/configuration.nix +++ b/users/fish/cattop/configuration.nix @@ -15,9 +15,6 @@ networking.hostName = "cattop"; # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. - # Set your time zone. - Time.timeZone = "America/Los_Angeles"; - services.xserver.enable = true; services.displayManager.gdm.enable = true; @@ -81,7 +78,6 @@ users.users.fish = { isNormalUser = true; - shell = pkgs.fish; extraGroups = [ "wheel" "dialout" @@ -91,7 +87,6 @@ git nh vim - fish ]; }; programs.git = { @@ -113,7 +108,6 @@ wget ]; - programs.fish.enable = true; programs.mtr.enable = true; programs.gnupg.agent = { enable = true; diff --git a/users/fish/cattop/hardware-configuration.nix b/users/fish/cattop/hardware-configuration.nix index 7e98eeb8a81bcaa008732b48c6b2c13496ca1599..b16ddcb14f7da7960d16b1feb84affeece222af5 100644 --- a/users/fish/cattop/hardware-configuration.nix +++ b/users/fish/cattop/hardware-configuration.nix @@ -1,46 +1,32 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ - config, - lib, - pkgs, - modulesPath, - ... -}: +{ config, lib, pkgs, modulesPath, ... }: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ - "xhci_pci" - "thunderbolt" - "vmd" - "nvme" - ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = { - device = "/dev/disk/by-uuid/8eb0d6a2-b8cf-4ef2-ba2a-e25a5555b0bc"; - fsType = "ext4"; - }; + fileSystems."/" = + { device = "/dev/disk/by-uuid/d434c90f-e135-426e-b237-ead2f44e37c6"; + fsType = "ext4"; + }; - fileSystems."/boot/efi" = { - device = "/dev/disk/by-uuid/3B51-4A1C"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" + fileSystems."/boot/EFI" = + { device = "/dev/disk/by-uuid/473A-B8FD"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/e0cac471-0e32-4d5a-bf85-e8f93b304356"; } ]; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/58ee9d19-292f-49b5-9979-341b42e8e09d"; } - ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/users/fish/cattop/home.nix b/users/fish/cattop/home.nix index fee99c66087e20c50a769208497aad0e37d8c6ac..6cef84292dabfa59f7a19ca31c11d3c9628e4d73 100644 --- a/users/fish/cattop/home.nix +++ b/users/fish/cattop/home.nix @@ -8,12 +8,11 @@ ghostty signal-desktop spotify - inputs.zen-browser.packages.x86_64-linux.default legcord # Gaming (prismlauncher.override { gamemodeSupport = true; }) - bsdgames + #bsdgames space-cadet-pinball # System & desktop tools @@ -41,7 +40,6 @@ programs = { btop.enable = true; - fish.enable = true; hyfetch.enable = true; gh = { -- 2.54.0 From f4817e31485e763cdf2dad6b021895f964033aba Mon Sep 17 00:00:00 2001 From: clover caruso Date: Mon, 1 Sep 2025 12:37:58 -0700 Subject: [PATCH 20/24] clover: configure jujutsu log to look really nice so far, part of my strategy has been tagging incomplete commits with "WIP" and then renaming them once i'm ready to push them. here, the default log revset will just show all WIPs, and the custom display template will very clearly highlight them along with the usual conventional commit stuff. --- modules/home/default.nix | 6 ++ users/clover/home.nix | 187 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 192 insertions(+), 1 deletion(-) diff --git a/modules/home/default.nix b/modules/home/default.nix index 38811b880fb60af75ae564d2ba787a1a7c7f2dd7..64fbd631b34421db740a329ea8f752b863bf684d 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -152,6 +152,12 @@ in }; ui = { default-command = "log"; + diff-formatter = [ + "${pkgs.difftastic}/bin/difft" + "--color=always" + "$left" + "$right" + ]; pager = "${pkgs.bat}/bin/bat --style=plain"; }; }; diff --git a/users/clover/home.nix b/users/clover/home.nix index de5840b081b97253c5991ee78fac02dba651a767..d8674c7e5fa8fa528ad15e36ffdd837513f16db1 100644 --- a/users/clover/home.nix +++ b/users/clover/home.nix @@ -81,7 +81,192 @@ in # use a git-specific email git.userEmail = "git@paperclover.net"; - jujutsu.enable = true; + jujutsu = { + enable = true; + # my workflow is based on creating changes and editing them. while they + # are in progress the description starts with "WIP: " + settings = rec { + colors = { + bookmark = "green"; + bookmarks = colors.bookmark; + local_bookmarks = colors.bookmarks; + remote_bookmarks = colors.bookmark; + "working_copy bookmark" = "bright green"; + "working_copy bookmarks" = colors."working_copy bookmark"; + "working_copy local_bookmarks" = colors."working_copy bookmark"; + "working_copy remote_bookmarks" = colors."working_copy bookmark"; + + "author" = { + fg = "white"; + bold = false; + italic = true; + }; + "working_copy author" = colors.author; + + desc = { + bold = false; + fg = "bright white"; + }; + description = colors.desc; + cc_wip = { + fg = "bright yellow"; + bold = true; + reverse = true; + }; + cc_header = { + bold = true; + fg = "bright white"; + }; + cc_feat = "green"; + cc_fix = "red"; + cc_hotfix = "red"; + cc_chore = "yellow"; + cc_test = "blue"; + cc_other = "blue"; + cc_scope = { + fg = "cyan"; + bold = false; + italic = true; + }; + + active_marker = { + fg = "bright magenta"; + bold = true; + reverse = true; + }; + conflict_marker = { + fg = "bright red"; + bold = true; + reverse = true; + }; + + timestamp = "bright black"; + commit_id = { + fg = "bright black"; + bold = false; + }; + muted = "bright black"; + }; + # ui.graph.style = "square"; + revsets = { + log = "ancestors(description(regex:\"^(WIP:|\\\\s*$)\"), 3) | ancestors(immutable_heads(), 2) | ancestors(visible_heads(), 2)"; + short-prefixes = "(trunk()..@)::"; + }; + templates.log = "hl_wip(self)"; + + template-aliases = { + # log template, highlighting the WIP commits by making everything else faded out + "hl_wip(commit)" = '' + if(commit.root(), format_root_commit(commit), + label("__commit__", + format_short_commit_header(commit) ++ "\n" ++ + format_commit_description(commit) + ) + ) + ''; + + "format_commit_description(commit)" = '' + label("desc", format_commit_firstline(commit.description().first_line())) ++ + "\n" ++ if( + commit.description().starts_with("WIP:") || commit.current_working_copy(), + commit.description().remove_prefix(commit.description().first_line()).remove_prefix("\n").trim_end() ++ "\n ", + if(commit.description().remove_prefix(commit.description().first_line()).trim().len() > 0, + label("muted", lines_collapsed(commit.description().lines().filter(|x| x.trim().len() > 0).len() - 1)), + " " + ) + ) + ''; + "lines_collapsed(count)" = + ''("[" ++ stringify(count ++ " line" ++ if(count == 1, "", "s")) ++ " collapsed]\n")''; + "format_commit_firstline(line)" = '' + if(line.starts_with("WIP:"), + label("cc_wip", " WIP ") ++ " " ++ format_commit_firstline_a_wip(line.remove_prefix("WIP:").trim()), + format_commit_firstline_a_wip(line) + ) + ''; + "format_commit_firstline_a_wip(line)" = '' + if(line.starts_with("feat:") || line.starts_with("feat("), + label("cc_feat", "feat") ++ format_commit_firstline_a_cc_type(line.remove_prefix("feat")), + if(line.starts_with("fix:") || line.starts_with("fix("), + label("cc_fix", "fix") ++ format_commit_firstline_a_cc_type(line.remove_prefix("fix")), + if(line.starts_with("hotfix:") || line.starts_with("hotfix("), + label("cc_hotfix", "hotfix") ++ format_commit_firstline_a_cc_type(line.remove_prefix("hotfix")), + if(line.starts_with("chore:") || line.starts_with("chore("), + label("cc_chore", "chore") ++ format_commit_firstline_a_cc_type(line.remove_prefix("chore")), + if(line.starts_with("test:") || line.starts_with("test("), + label("cc_other", "test") ++ format_commit_firstline_a_cc_type(line.remove_prefix("test")), + if(line.starts_with("refactor:") || line.starts_with("refactor("), + label("cc_other", "refactor") ++ format_commit_firstline_a_cc_type(line.remove_prefix("refactor")), + if(line.starts_with("perf:") || line.starts_with("perf("), + label("cc_other", "perf") ++ format_commit_firstline_a_cc_type(line.remove_prefix("perf")), + if(line.starts_with("lib:") || line.starts_with("lib("), + label("cc_other", "lib") ++ format_commit_firstline_a_cc_type(line.remove_prefix("lib")), + label("cc_header", line) + )))))))) + ''; + "format_commit_firstline_a_cc_type(rest)" = '' + if(rest.starts_with("(") && rest.contains(")"), + format_firstline_cc_scope(rest, index_of_close_paren(rest)), + format_firstline_a_cc(rest)) + ''; + "format_firstline_cc_scope(rest, index)" = '' + label("cc_scope", rest.substr(0, index)) ++ format_firstline_a_cc(rest.substr(index, rest.len())) + ''; + "format_firstline_a_cc(rest)" = '' + if(rest.starts_with(":"), + label("muted", ":") ++ label("cc_header", rest.remove_prefix(":")), + label("cc_header", rest) + ) + ''; + # sorry! + "index_of_close_paren(line)" = '' + stringify(if(line.substr(1, 2) == ")", "A", + if(line.substr(2, 3) == ")", "AA", + if(line.substr(3, 4) == ")", "AAA", + if(line.substr(4, 5) == ")", "AAAA", + if(line.substr(5, 6) == ")", "AAAAA", + if(line.substr(6, 7) == ")", "AAAAAA", + if(line.substr(7, 8) == ")", "AAAAAAA", + if(line.substr(8, 9) == ")", "AAAAAAAA", + if(line.substr(9, 10) == ")","AAAAAAAAA", + if(line.substr(10, 11) == ")", "AAAAAAAAAA", + if(line.substr(11, 12) == ")", "AAAAAAAAAAA", + if(line.substr(12, 13) == ")", "AAAAAAAAAAAA", + if(line.substr(13, 14) == ")", "AAAAAAAAAAAAA", + if(line.substr(14, 15) == ")", "AAAAAAAAAAAAAA", + if(line.substr(15, 16) == ")", "AAAAAAAAAAAAAAA", + if(line.substr(16, 17) == ")", "AAAAAAAAAAAAAAAA", + if(line.substr(17, 18) == ")", "AAAAAAAAAAAAAAAAA", + if(line.substr(18, 19) == ")", "AAAAAAAAAAAAAAAAAA", + if(line.substr(19, 20) == ")", "AAAAAAAAAAAAAAAAAAA", + if(line.substr(20, 21) == ")", "AAAAAAAAAAAAAAAAAAAA", + "AAAAAAAAAAAAAAAAAAAAA" + ))))))))))))))))))))).len() + 1 + ''; + + "format_short_signature(signature)" = "signature.name()"; + "format_timestamp(timestamp)" = "timestamp.ago()"; + "format_short_commit_header(commit)" = '' + separate(" ", + if(commit.current_working_copy(), label("active_marker", " ACTIVE ")), + if(commit.conflict(), label("conflict_marker", " CONFLICT ")), + format_short_change_id_with_hidden_and_divergent_info(commit), + format_short_signature(commit.author()), + label("muted", "|"), + if(commit.description().trim().len() > 0, label("muted", format_timestamp(commit_timestamp(commit)))), + commit.bookmarks(), + commit.tags(), + commit.working_copies(), + label("muted", "(") ++ + format_short_commit_id(commit.commit_id()) ++ + label("muted", ")"), + if(config("ui.show-cryptographic-signatures").as_boolean(), + format_short_cryptographic_signature(commit.signature())), + ) + ''; + }; + }; + }; ssh = { enable = true; -- 2.54.0 From 168c36042b1a70c406e4d195d34c20c482a3cde3 Mon Sep 17 00:00:00 2001 From: clover caruso Date: Wed, 24 Sep 2025 11:59:26 -0700 Subject: [PATCH 21/24] clover: setup work environment switch command gets some new features to account for the fact my work device hostname contains info about the company i work for. --- .gitignore | 3 ++- flake.nix | 6 ++++++ switch | 21 ++++++++++++++++----- users/clover/home.nix | 12 ++---------- users/clover/paperback/home.nix | 4 ---- users/clover/work/home.nix | 23 +++++++++++++++++++++++ 6 files changed, 49 insertions(+), 20 deletions(-) create mode 100644 users/clover/work/home.nix diff --git a/.gitignore b/.gitignore index b12e90ad5ad4ae77215e74cdf66de71da19ef3cc..fd9d1ca548f88694b09655ec42567e08161475b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -flake.lock .DS_STORE +.hostname +flake.lock result result-* diff --git a/flake.nix b/flake.nix index 28101b0755d19ad6d382be93307cd255f30fc903..cebe693a0da4cbaf4b7f067231349b803ff3d5b3 100644 --- a/flake.nix +++ b/flake.nix @@ -133,6 +133,12 @@ host = "paperback"; system = "aarch64-darwin"; }; + # clover's work macbook pro + darwinConfigurations.clover-work-mac = mkSystem "clover-work-mac" { + user = "clover"; + host = "work"; + system = "aarch64-darwin"; + }; # fish's cattop nixosConfigurations.cattop = mkSystem "cattop" { diff --git a/switch b/switch index 3c267596a89ce1a79011f5431c6d73cc4e2a25ec..bf5697d655d9362730c9db9854db34b7950154fc 100755 --- a/switch +++ b/switch @@ -1,12 +1,23 @@ #!/bin/sh nh_subcommand="os" fallback_command="nixos-rebuild" -if [ "$(uname -o)" = "darwin" ]; then - nh_subcommand="darwin" - fallback_command="nix run .#darwin-rebuild" +hostname_file="$(dirname "$0")/.hostname" +if [ -n "$1" ]; then + hostname="$1" +elif [ -f "$hostname_file" ]; then + hostname=$(cat "$hostname_file") +fi +if [ -z "$hostname" ]; then + hostname="$(hostname)" +fi +printf "%s" "$hostname" >"$hostname_file" +if [ "$(uname -o)" = "Darwin" ]; then + nh_subcommand="darwin" + fallback_command="nix run .#darwin-rebuild" + hostname="darwinConfigurations.$hostname" fi if command -v nh >/dev/null; then - nh $nh_subcommand switch . + nh $nh_subcommand switch '.#'"$hostname" else - $fallback_command -- switch --flake . + $fallback_command -- switch --flake '.#'"$hostname" fi diff --git a/users/clover/home.nix b/users/clover/home.nix index d8674c7e5fa8fa528ad15e36ffdd837513f16db1..8ac1b46d4bddc71134455dbb08b2264fb8be802a 100644 --- a/users/clover/home.nix +++ b/users/clover/home.nix @@ -10,9 +10,7 @@ in let # packages to always install all = [ - (ffmpeg.override { - withSvtav1 = true; - }) + ffmpeg-full ripgrep uv nh @@ -22,6 +20,7 @@ in desktop = [ git-town lazygit + jjui ]; # packages to install on all servers server = [ ]; @@ -278,12 +277,5 @@ in "nas.paperclover.net" = zenith; }; }; - neovide = { - enable = !hostServer; - settings = { - font.normal = "AT Name Mono"; - font.size = 13; - }; - }; }; } diff --git a/users/clover/paperback/home.nix b/users/clover/paperback/home.nix index 711130f295df837f03f7c41ca2efc7cc64491798..47d88a2034872f1efc7c06355eef2e3b004436b3 100644 --- a/users/clover/paperback/home.nix +++ b/users/clover/paperback/home.nix @@ -3,7 +3,6 @@ # these programs are not globally installed to reduce distractions. # most of these are needed for my work environment. programs = { - bun.enable = true; zsh.profileExtra = '' _bun() { local context state line @@ -12,7 +11,6 @@ ''; }; home.packages = with pkgs; [ - doppler deno nodejs_22 rustup @@ -22,7 +20,5 @@ yt-dlp spotdl zig - ssm-session-manager-plugin - awscli ]; } diff --git a/users/clover/work/home.nix b/users/clover/work/home.nix new file mode 100644 index 0000000000000000000000000000000000000000..5407bdbbc9bd19929d875a24a72da914e4233d31 --- /dev/null +++ b/users/clover/work/home.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: +{ + programs = { + zsh.profileExtra = '' + _bun() { + local context state line + _arguments -C '*:file:_files' + } + ''; + }; + home.packages = with pkgs; [ + (bun.overrideAttrs (_: { + version = "1.1.17"; # blocked on bugs + })) + doppler + deno + nodejs_24 + rustup + typescript + ssm-session-manager-plugin + awscli + ]; +} -- 2.54.0 From 7dc7c912ee419bb57834d22886da8172ef691583 Mon Sep 17 00:00:00 2001 From: clover caruso Date: Wed, 24 Sep 2025 12:22:26 -0700 Subject: [PATCH 22/24] clover: pin bun version --- users/clover/work/home.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/users/clover/work/home.nix b/users/clover/work/home.nix index 5407bdbbc9bd19929d875a24a72da914e4233d31..a5fb595349707f6b857c0e40e4208e08ccdeb756 100644 --- a/users/clover/work/home.nix +++ b/users/clover/work/home.nix @@ -9,8 +9,12 @@ ''; }; home.packages = with pkgs; [ - (bun.overrideAttrs (_: { - version = "1.1.17"; # blocked on bugs + (bun.overrideAttrs (_: rec { + version = "1.1.17"; + src = fetchurl { + url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-aarch64.zip"; + hash = "sha256-aULgRZ9evcGUhKJ6slLJOg3IEzUeNfIkJF8RDP3YUlo="; + }; })) doppler deno -- 2.54.0 From 7fd3f19d2b7d0c7ccd42d903f574ccfab32ac07d Mon Sep 17 00:00:00 2001 From: clover caruso Date: Wed, 24 Sep 2025 13:52:21 -0700 Subject: [PATCH 23/24] clover: fix ghostty theme breaking change --- users/clover/home.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users/clover/home.nix b/users/clover/home.nix index 8ac1b46d4bddc71134455dbb08b2264fb8be802a..4f799cb1e39b41021b6abfc173356266bfab50b0 100644 --- a/users/clover/home.nix +++ b/users/clover/home.nix @@ -48,7 +48,7 @@ in shader = "cursor-smear-black.glsl"; package = null; settings = { - theme = "light:farmhouse-light,dark:ChallengerDeep"; + theme = "light:Farmhouse Light,dark:Challenger Deep"; font-family = "AT Name Mono"; adjust-cursor-thickness = 1; background-opacity = 0.9; @@ -60,7 +60,7 @@ in zsh = { enable = true; shellAliases = { - switch = "nh darwin switch ~/config"; + switch = "~/config/switch"; gg = "lazygit"; ga = "git add"; g = "git status"; -- 2.54.0 From 94fcf2aaa0ea020ce7c3b9b0589b5eb39a738f62 Mon Sep 17 00:00:00 2001 From: Fish <77413091+JulianBarbera@users.noreply.github.com> Date: Tue, 30 Sep 2025 21:51:58 -0700 Subject: [PATCH 24/24] Updated vim --- users/fish/cattop/configuration.nix | 15 +-- users/fish/cattop/home.nix | 5 +- users/fish/vim.nix | 40 ++++++- users/fish/vim/default.nix | 9 ++ users/fish/vim/languages.nix | 155 ++++++++++++++++++++++++++++ users/fish/vim/latex.nix | 118 +++++++++++++++++++++ users/fish/vim/mini.nix | 10 ++ users/fish/vim/visuals.nix | 27 +++++ 8 files changed, 370 insertions(+), 9 deletions(-) create mode 100644 users/fish/vim/default.nix create mode 100644 users/fish/vim/languages.nix create mode 100644 users/fish/vim/latex.nix create mode 100644 users/fish/vim/mini.nix create mode 100644 users/fish/vim/visuals.nix diff --git a/users/fish/cattop/configuration.nix b/users/fish/cattop/configuration.nix index d455b262b7dd5253e88736b7c0d5f55cfb9a5e78..510ebab44d3118f2dfbec63a6d960b799c4f099e 100644 --- a/users/fish/cattop/configuration.nix +++ b/users/fish/cattop/configuration.nix @@ -66,12 +66,14 @@ services.printing.enable = true; # Enable sound. - # services.pulseaudio.enable = true; - # OR - # services.pipewire = { - # enable = true; - # pulse.enable = true; - # }; + services.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; # Enable touchpad support (enabled default in most desktopManager). # services.libinput.enable = true; @@ -81,6 +83,7 @@ extraGroups = [ "wheel" "dialout" + "audio" ]; packages = with pkgs; [ tree diff --git a/users/fish/cattop/home.nix b/users/fish/cattop/home.nix index 6cef84292dabfa59f7a19ca31c11d3c9628e4d73..717ef04009d48832066d111b9c4df8fb9615b61c 100644 --- a/users/fish/cattop/home.nix +++ b/users/fish/cattop/home.nix @@ -8,7 +8,7 @@ ghostty signal-desktop spotify - legcord + equibop # Gaming (prismlauncher.override { gamemodeSupport = true; }) @@ -27,14 +27,17 @@ efibootmgr pqiv imagemagick + toybox # Dev tools hyfetch python3 gh cmake + ripgrep # Unsorted + kicad ]; }; diff --git a/users/fish/vim.nix b/users/fish/vim.nix index 80d61f494d953950672d228d2d0e6a78e541999d..9104cec4f818859d19d728dd01182ea540e9b9c7 100644 --- a/users/fish/vim.nix +++ b/users/fish/vim.nix @@ -1,4 +1,40 @@ -{ ... }: +{ pkgs, ... }: { - vim.languages.svelte.enable = true; + imports = [ + ./vim/default.nix + ]; + + vim = { + #enable python provider + withPython3 = true; + python3Packages = [ "pynvim" ]; + + autocmds = [ + #Autocommand to fall back to treesitter folding if LSP doesnt support it + { + event = [ "LspAttach" ]; + callback = pkgs.lib.generators.mkLuaInline '' + function(args) + local client = vim.lsp.get_client_by_id(args.data.client_id) + if client:supports_method('textDocument/foldingRange') then + local win = vim.api.nvim_get_current_win() + vim.wo[win][0].foldexpr = 'v:lua.vim.lsp.foldexpr()' + end + end + ''; + } + ]; + + tabline = { + nvimBufferline.enable = true; + }; + startPlugins = [ + "nui-nvim" + ]; + theme = { + name = "catppuccin"; + style = "mocha"; + }; + hideSearchHighlight = true; + }; } diff --git a/users/fish/vim/default.nix b/users/fish/vim/default.nix new file mode 100644 index 0000000000000000000000000000000000000000..9d7518bb41816b453399dd044663a511ba364078 --- /dev/null +++ b/users/fish/vim/default.nix @@ -0,0 +1,9 @@ +{ ... }: +{ + imports = [ + ./languages.nix + ./latex.nix + ./visuals.nix + ./mini.nix + ]; +} diff --git a/users/fish/vim/languages.nix b/users/fish/vim/languages.nix new file mode 100644 index 0000000000000000000000000000000000000000..6c370854799533d6388b8eb992df055f6df93b7a --- /dev/null +++ b/users/fish/vim/languages.nix @@ -0,0 +1,155 @@ +{ + flake, + user, + host, + pkgs, + ... +}: +{ + vim = { + extraPackages = with pkgs; [ + python312Packages.pylatexenc + ]; + languages = { + lua.lsp.enable = true; + lua.lsp.lazydev.enable = true; + python = { + format.type = "ruff"; + }; + markdown = { + enable = true; + extensions.render-markdown-nvim = { + enable = true; + }; + }; + nix = { + lsp.servers = [ + "nil" + "nixd" + ]; + }; + }; + + formatter.conform-nvim = { + enable = true; + setupOpts = { + formatters_by_ft = { + fish = [ "fish_indent" ]; + tex = [ "latexindent" ]; + }; + }; + }; + diagnostics = { + enable = true; + config = { + virtual_text = { + format = pkgs.lib.generators.mkLuaInline '' + function(diagnostic) + return string.format("%s (%s)", diagnostic.message, diagnostic.source) + end + ''; + }; + }; + nvim-lint = { + enable = true; + linters_by_ft = { + nix = [ "statix" ]; + tex = [ "chktex" ]; + haskell = [ "hlint" ]; + }; + + linters = { + chktex = { + ignore_exitcode = true; + }; + }; + }; + }; + treesitter = { + enable = true; + fold = true; + addDefaultGrammars = true; + highlight = { + additionalVimRegexHighlighting = true; + }; + + grammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ + markdown_inline + markdown + ]; + + highlight.enable = true; + indent.enable = false; + }; + + visuals = { + fidget-nvim = { + setupOpts = { + logger.level = "trace"; + }; + }; + }; + + ui = { + nvim-ufo = { + enable = true; + }; + }; + autocomplete.blink-cmp = { + enable = true; + mappings = { + close = null; + complete = null; + confirm = null; + next = null; + previous = null; + scrollDocsDown = null; + scrollDocsUp = null; + }; + + setupOpts = { + keymap = { + preset = "super-tab"; + }; + completion = { + ghost_text.enabled = false; + list.selection.preselect = true; + trigger = { + show_in_snippet = true; + }; + accept.auto_brackets.enabled = true; + }; + signature = { + enabled = true; + }; + }; + }; + + lazy.plugins."blink.pairs" = { + enabled = true; + package = pkgs.vimPlugins.blink-pairs; + setupModule = "blink.pairs"; + setupOpts = { + mappings = { + # -- you can call require("blink.pairs.mappings").enable() and require("blink.pairs.mappings").disable() to enable/disable mappings at runtime + enabled = true; + # -- see the defaults: https://github.com/Saghen/blink.pairs/blob/main/lua/blink/pairs/config/mappings.lua#L10 + pairs = [ ]; + }; + highlights = { + enabled = true; + groups = [ + "BlinkPairsOrange" + "BlinkPairsPurple" + "BlinkPairsBlue" + ]; + matchparen = { + enabled = true; + group = "MatchParen"; + }; + }; + debug = false; + }; + }; + }; +} diff --git a/users/fish/vim/latex.nix b/users/fish/vim/latex.nix new file mode 100644 index 0000000000000000000000000000000000000000..dd256a544add51076952ca5837f0ebc5631f0a06 --- /dev/null +++ b/users/fish/vim/latex.nix @@ -0,0 +1,118 @@ +{ pkgs, host, ... }: +{ + vim = { + extraPackages = with pkgs; [ + texliveFull + ]; + lazy.plugins.cmp-vimtex = { + enabled = true; + package = pkgs.vimPlugins.cmp-vimtex; + lazy = false; + + }; + lazy.plugins.vimtex = { + enabled = true; + package = pkgs.vimPlugins.vimtex; + lazy = false; + }; + + globals = { + tex_flavor = "latex"; + maplocalleader = "\\"; + vimtex_compiler_method = "latexmk"; + vimtex_view_method = if host.darwin then "skim" else "zathura"; + vimtex_view_automatic = 1; + vimtex_compiler_latexmk = { + callback = 1; + continuous = 1; + executable = "latexmk"; + hooks = [ ]; + options = [ + "-verbose" + "-file-line-error" + "-synctex=1" + "-interaction=nonstopmode" + "-shell-escape" + ]; + }; + vimtex_log_ignore = [ + "Underfull" + "Overfull" + "specifier changed to" + "Token not allowed in a PDF string" + ]; + vimtex_quickfix_ignore_filters = [ + "Underfull" + "Overfull" + ]; + }; + + autocomplete.blink-cmp = { + sourcePlugins = { + "blink.compat" = { + enable = true; + package = "blink-compat"; + module = "blink.compat.source"; + }; + }; + setupOpts = { + sources = { + default = [ "vimtex" ]; + providers = { + vimtex = { + name = "vimtex"; + module = "blink.compat.source"; + score_offset = 100; + }; + }; + }; + }; + }; + + augroups = [ + { + name = "VimTeX Events"; + } + ]; + autocmds = [ + { + pattern = [ "VimtexEventViewReverse" ]; + event = [ "User" ]; + desc = "Return to nvim after reverse search"; + command = "call b:vimtex.viewer.xdo_focus_vim()"; + group = "VimTeX Events"; + } + { + pattern = [ "VimtexEventQuit" ]; + event = [ "User" ]; + desc = "Close pdf after exiting nvim"; + command = "VimtexClean"; + group = "VimTeX Events"; + } + + { + pattern = [ "VimtexEventInitPost" ]; + event = [ "User" ]; + desc = "Start compiling when opening nvim to a tex file"; + command = "VimtexCompile"; + group = "VimTeX Events"; + } + + ]; + + lsp = { + servers = { + texlab = { + enable = true; + cmd = [ "${pkgs.texlab}/bin/texlab" ]; + filetypes = [ "tex" ]; + }; + }; + }; + treesitter = { + grammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ + latex + ]; + }; + }; +} diff --git a/users/fish/vim/mini.nix b/users/fish/vim/mini.nix new file mode 100644 index 0000000000000000000000000000000000000000..b8119e7ae3dd250c84ec324309d6b0cbe8d30fc2 --- /dev/null +++ b/users/fish/vim/mini.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: +{ + vim = { + mini = { + icons.enable = true; + ai.enable = true; + surround.enable = true; + }; + }; +} diff --git a/users/fish/vim/visuals.nix b/users/fish/vim/visuals.nix new file mode 100644 index 0000000000000000000000000000000000000000..09759c3e78e9e3f9522cbc0a1ed03e17e2340614 --- /dev/null +++ b/users/fish/vim/visuals.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: +{ + vim = { + ui = { + noice = { + enable = true; + setupOpts = { + lsp = { + progress.enabled = false; + signature.enabled = true; + }; + presets = { + lsp_doc_border = true; + long_message_to_split = true; + inc_rename = false; + command_palette = false; + bottom_search = true; + }; + }; + }; + borders = { + enable = true; + }; + }; + + }; +} -- 2.54.0