diff --git a/flake.lock b/flake.lock index e3ad0a1..0837409 100644 --- a/flake.lock +++ b/flake.lock @@ -96,6 +96,22 @@ "type": "github" } }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1777699697, + "narHash": "sha256-Eg9b/rq/ECYwNwEXs5i9wHyhxNI0JrYx2srdI2uZMaQ=", + "ref": "refs/heads/main", + "rev": "382052b74656a369c5408822af3f2501e9b1af81", + "revCount": 94, + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" + }, + "original": { + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -236,6 +252,21 @@ "type": "github" } }, + "mnw": { + "locked": { + "lastModified": 1780772958, + "narHash": "sha256-VKKe8r4pwCGWZ3Yr9CPN129R4S3CKLSrlYqdYz3vKpM=", + "owner": "Gerg-L", + "repo": "mnw", + "rev": "0871dbf63a53610c95db04439ed8ea4d6ec9c160", + "type": "github" + }, + "original": { + "owner": "Gerg-L", + "repo": "mnw", + "type": "github" + } + }, "nix-flatpak": { "locked": { "lastModified": 1739444422, @@ -317,6 +348,19 @@ } }, "nixpkgs_5": { + "locked": { + "lastModified": 1783148766, + "narHash": "sha256-H9+N+GFtsbVC8ZniHliChM7ndizxtqVZs6bnGOLM3WQ=", + "rev": "a50de1b7d8a586adc18d2395c19de7d6058e6030", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/26.05/nixos-26.05.4193.a50de1b7d8a5/nixexprs.tar.xz?lastModified=1783148766&rev=a50de1b7d8a586adc18d2395c19de7d6058e6030" + }, + "original": { + "type": "tarball", + "url": "https://channels.nixos.org/nixos-26.05/nixexprs.tar.xz" + } + }, + "nixpkgs_6": { "locked": { "lastModified": 1744536153, "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", @@ -353,6 +397,26 @@ "url": "https://scm.wyattjmiller.com/wymiller/nur.git" } }, + "nvf": { + "inputs": { + "flake-compat": "flake-compat_3", + "mnw": "mnw", + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1783767627, + "narHash": "sha256-UgQuKee2d5VhXaqectc23i2rarIufUpAVSTA6R8XloY=", + "owner": "notashelf", + "repo": "nvf", + "rev": "c55a3a783e6e1ecbbaad607b15a9b7b23d42236f", + "type": "github" + }, + "original": { + "owner": "notashelf", + "repo": "nvf", + "type": "github" + } + }, "root": { "inputs": { "aagl": "aagl", @@ -362,6 +426,7 @@ "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs_2", "nur": "nur", + "nvf": "nvf", "rust-overlay": "rust-overlay_2" } }, @@ -388,7 +453,7 @@ }, "rust-overlay_2": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1781234414, diff --git a/flake.nix b/flake.nix index c41215c..7028d1b 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,7 @@ url = "github:ezKEa/aagl-gtk-on-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + nvf.url = "github:notashelf/nvf"; nur.url = "git+https://scm.wyattjmiller.com/wymiller/nur.git"; }; @@ -30,12 +31,13 @@ go-overlay, aagl, nur, + nvf, ... }: let userName = "wyatt"; userEmail = "wyatt@wyattjmiller.com"; extraSpecialArgs = { - inherit userName userEmail nur; + inherit userName userEmail nur nvf; }; myOverlays = { ... }: { @@ -221,7 +223,7 @@ pkgs = nixpkgs.legacyPackages.${system}; extraSpecialArgs = { - inherit userName userEmail hostname; + inherit userName userEmail hostname nvf; isNixOS = false; role = "workstation"; }; diff --git a/home/neovim.nix b/home/neovim.nix index eebfd50..7a1a6ac 100644 --- a/home/neovim.nix +++ b/home/neovim.nix @@ -1,18 +1,108 @@ -{...}: let - dirs = { - defaults = ../defaults; - }; -in { - programs.neovim = { - enable = true; - defaultEditor = true; - vimAlias = true; - }; +{ nvf, ... }: { + imports = [ + nvf.homeManagerModules.default + ]; - xdg.configFile = { - nvim = { - onChange = "nvim --headless -c 'if exists(\":LuaCacheClear\") | :LuaCacheClear' +quitall"; - source = dirs.defaults + /nvim; + programs.nvf = { + enable = true; + settings = { + vim = { + viAlias = true; + vimAlias = true; + lsp.enable = true; + treesitter.enable = true; + autocomplete.nvim-cmp.enable = true; + + languages = { + rust.enable = true; + go.enable = true; + python.enable = true; + markdown.enable = true; + css.enable = true; + scss.enable = true; + tsx.enable = true; + typescript = { + enable = true; + lsp.servers = [ "typescript-language-server" "deno" ]; + }; + }; + + utility.surround.enable = true; + telescope.enable = true; + mini.icons.enable = true; + notes.obsidian = { + enable = true; + setupOpts.workspaces = [ + { + name = "personal"; + path = "~/Documents/Obsidian/notes"; + } + ]; + }; + + terminal.toggleterm = { + enable = true; + lazygit = { + enable = true; + mappings.open = "gg"; + }; + }; + filetree.neo-tree.enable = true; + binds.whichKey.enable = true; + + clipboard = { + enable = true; + registers = "unnamedplus"; + providers = { + wl-copy.enable = true; + xclip.enable = true; + }; + }; + + lsp.null-ls = { + enable = true; + setupOpts = {}; + }; + lsp.trouble.enable = true; + + theme = { + enable = true; + name = "catppuccin"; + style = "mocha"; + transparent = false; + }; + + dashboard.alpha.enable = true; + + statusline.lualine.enable = true; + + keymaps = [ + { + key = ""; + mode = "n"; + action = "w"; + silent = true; + noremap = true; + } + { key = "o"; mode = "n"; action = "Neotree toggle"; silent = true; noremap = true; } + { key = "tf"; mode = "n"; action = "ToggleTerm direction=float"; silent = true; noremap = true; } + { key = "th"; mode = "n"; action = "ToggleTerm direction=horizontal"; silent = true; noremap = true; } + { key = "tv"; mode = "n"; action = "ToggleTerm direction=vertical"; silent = true; noremap = true; } + { key = "n"; mode = "n"; action = ""; desc = "Notes"; silent = true; noremap = true; } + { key = "nd"; mode = "n"; action = "Obsidian today"; desc = "Obsidian daily note"; silent = true; noremap = true; } + { key = "nf"; mode = "n"; action = "Obsidian quick_switch"; desc = "Obsidian find note"; silent = true; noremap = true; } + { key = "ns"; mode = "n"; action = "Obsidian search"; desc = "Obsidian search notes"; silent = true; noremap = true; } + { key = "nn"; mode = "n"; action = "Obsidian new"; desc = "Obsidian new note"; silent = true; noremap = true; } + { key = "ff"; mode = "n"; action = "Telescope find_files"; silent = true; noremap = true; } + { key = "fD"; mode = "n"; action = "lua require('telescope.builtin').find_files({ cwd = vim.fn.input('Dir: ', vim.loop.cwd() .. '/', 'dir') })"; silent = true; noremap = true; } + { key = "fg"; mode = "n"; action = "Telescope live_grep"; silent = true; noremap = true; } + { key = "/"; mode = "n"; action = "Telescope current_buffer_fuzzy_find"; silent = true; noremap = true; } + { key = "gb"; mode = "n"; action = "Telescope git_branches"; silent = true; noremap = true; } + { key = "gc"; mode = "n"; action = "Telescope git_commits"; silent = true; noremap = true; } + { key = "gl"; mode = "n"; action = "Telescope git_bcommits"; silent = true; noremap = true; } + { key = "gr"; mode = "n"; action = "Telescope git_status"; silent = true; noremap = true; } + ]; + }; }; }; }