From bda5f1c550d0038c4707b1c88982ec6f6f491617 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Thu, 7 Aug 2025 22:49:58 -0500 Subject: [PATCH 1/3] nixvim -> nvf --- flake.lock | 132 ++++++++++++-------------------------- flake.nix | 6 +- home/common/default.nix | 4 +- home/common/nvf.nix | 138 ++++++++++++++++++++++++++++++++++++++++ home/default.nix | 3 +- 5 files changed, 186 insertions(+), 97 deletions(-) create mode 100644 home/common/nvf.nix diff --git a/flake.lock b/flake.lock index 43e8d25..19eb3b0 100644 --- a/flake.lock +++ b/flake.lock @@ -94,6 +94,22 @@ "type": "github" } }, + "flake-compat_3": { + "flake": false, + "locked": { + "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": { + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -118,16 +134,16 @@ "flake-parts_2": { "inputs": { "nixpkgs-lib": [ - "nixvim", + "nvf", "nixpkgs" ] }, "locked": { - "lastModified": 1754091436, - "narHash": "sha256-XKqDMN1/Qj1DKivQvscI4vmHfDfvYR2pfuFOJiCeewM=", + "lastModified": 1753121425, + "narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "67df8c627c2c39c41dbec76a1f201929929ab0bd", + "rev": "644e0fc48951a860279da645ba77fe4a6e814c5e", "type": "github" }, "original": { @@ -187,24 +203,6 @@ "type": "github" } }, - "flake-utils_4": { - "inputs": { - "systems": "systems_3" - }, - "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" - } - }, "git-hooks-nix": { "inputs": { "flake-compat": [ @@ -256,31 +254,18 @@ "type": "github" } }, - "ixx": { - "inputs": { - "flake-utils": [ - "nixvim", - "nuschtosSearch", - "flake-utils" - ], - "nixpkgs": [ - "nixvim", - "nuschtosSearch", - "nixpkgs" - ] - }, + "mnw": { "locked": { - "lastModified": 1748294338, - "narHash": "sha256-FVO01jdmUNArzBS7NmaktLdGA5qA3lUMJ4B7a05Iynw=", - "owner": "NuschtOS", - "repo": "ixx", - "rev": "cc5f390f7caf265461d4aab37e98d2292ebbdb85", + "lastModified": 1748710831, + "narHash": "sha256-eZu2yH3Y2eA9DD3naKWy/sTxYS5rPK2hO7vj8tvUCSU=", + "owner": "Gerg-L", + "repo": "mnw", + "rev": "cff958a4e050f8d917a6ff3a5624bc4681c6187d", "type": "github" }, "original": { - "owner": "NuschtOS", - "ref": "v0.0.8", - "repo": "ixx", + "owner": "Gerg-L", + "repo": "mnw", "type": "github" } }, @@ -506,49 +491,27 @@ "type": "github" } }, - "nixvim": { + "nvf": { "inputs": { + "flake-compat": "flake-compat_3", "flake-parts": "flake-parts_2", + "mnw": "mnw", "nixpkgs": [ "nixpkgs" ], - "nuschtosSearch": "nuschtosSearch", - "systems": "systems_4" + "systems": "systems_3" }, "locked": { - "lastModified": 1754397955, - "narHash": "sha256-4hQT8mDSRNgPKiPdpYwr2QVJdA4FaUhOjT2lKkW8QHQ=", - "owner": "nix-community", - "repo": "nixvim", - "rev": "8d47a07563120b36af149edf2273034563339a91", + "lastModified": 1754552918, + "narHash": "sha256-vbT+nGdMLNAeYZ1S5WBBLJTVWosGne2VRt46rqPfB2A=", + "owner": "notashelf", + "repo": "nvf", + "rev": "d61de135ce174f4e04b4e509de02e1afe040a834", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "nixvim", - "type": "github" - } - }, - "nuschtosSearch": { - "inputs": { - "flake-utils": "flake-utils_4", - "ixx": "ixx", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1754301638, - "narHash": "sha256-aRgzcPDd2axHFOuMlPLuzmDptUM2JU8mUL3jfgbBeyc=", - "owner": "NuschtOS", - "repo": "search", - "rev": "a60091045273484c040a91f5c229ba298f8ecc27", - "type": "github" - }, - "original": { - "owner": "NuschtOS", - "repo": "search", + "owner": "notashelf", + "repo": "nvf", "type": "github" } }, @@ -563,7 +526,7 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_6", "nixpkgs-stable": "nixpkgs-stable", - "nixvim": "nixvim" + "nvf": "nvf" } }, "rust-overlay": { @@ -644,21 +607,6 @@ "repo": "default", "type": "github" } - }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 806c4d0..4a41b6c 100644 --- a/flake.nix +++ b/flake.nix @@ -15,8 +15,10 @@ home-manager.inputs.nixpkgs.follows = "nixpkgs"; naviterm.url = "gitlab:detoxify92/naviterm"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; - nixvim.url = "github:nix-community/nixvim"; - nixvim.inputs.nixpkgs.follows = "nixpkgs"; + nvf.url = "github:notashelf/nvf"; + nvf.inputs.nixpkgs.follows = "nixpkgs"; + # nixvim.url = "github:nix-community/nixvim"; + # nixvim.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = inputs@{ self, nixpkgs, nix, nixpkgs-stable, nixos-hardware diff --git a/home/common/default.nix b/home/common/default.nix index 2785776..e27f272 100644 --- a/home/common/default.nix +++ b/home/common/default.nix @@ -12,10 +12,10 @@ ./liquidprompt.nix ./listadmin.nix ./mail.nix - # ./mopidy.nix ./naviterm.nix ./newsboat.nix - ./nixvim.nix + ./nvf.nix + # ./nixvim.nix ./ssh.nix ./taskwarrior.nix ./topgrade.nix diff --git a/home/common/nvf.nix b/home/common/nvf.nix new file mode 100644 index 0000000..1d9ea21 --- /dev/null +++ b/home/common/nvf.nix @@ -0,0 +1,138 @@ +{ config, pkgs, nixvim, ... }: { + programs.nvf = { + enable = true; + settings = { + vim = { + autocomplete.nvim-cmp.enable = true; + dashboard.alpha = { + enable = true; + theme = "dashboard"; + }; + filetree.neo-tree = { enable = true; }; + comments.comment-nvim.enable = true; + autopairs.nvim-autopairs.enable = true; + snippets.luasnip.enable = true; + terminal = { + toggleterm = { + enable = true; + lazygit = { + enable = true; + }; + }; + }; + treesitter = { + enable = true; + context.enable = true; + fold = true; + autotagHtml.enable = true; + }; + syntaxHighlighting = true; + keymaps = [ + { + key = ""; + action = ":bnext"; + mode = ["n"]; + } + { + key = "t"; + action = ":Telescope buffers"; + mode = ["n"]; + } + { + key = "T"; + action = ":terminal"; + mode = ["n"]; + } + { + key = "e"; + action = ":Neotree toggle"; + mode = ["n"]; + } + { + key = "o"; + action = ":Obsidian"; + mode = ["n"]; + } + { + key = "gg"; + action = ":LazyGit"; + mode = ["n"]; + } + { + key = "gl"; + action = ":LazyGitLog"; + mode = ["n"]; + } + ]; + git = { + enable = true; + gitsigns.enable = true; + gitsigns.codeActions.enable = false; + neogit.enable = true; + }; + languages = { + enableTreesitter = true; + enableFormat = true; + enableExtraDiagnostics = true; + bash.enable = true; + lua.enable = true; + go.enable = true; + python.enable = true; + markdown = { + enable = true; + extensions.render-markdown-nvim.enable = true; + }; + nix.enable = true; + html.enable = true; + }; + lsp = { + enable = true; + formatOnSave = true; + lspkind.enable = false; + lightbulb.enable = true; + lspsaga.enable = false; + trouble.enable = true; + }; + options = { conceallevel = 1; }; + statusline.lualine.enable = true; + telescope.enable = true; + theme = { + enable = true; + name = "catppuccin"; + style = "mocha"; + }; + viAlias = true; + vimAlias = true; + notes = { + obsidian = { + enable = true; + setupOpts = { + legacy_commands = true; + completion.nvim-cmp = true; + templates = { subdir = "Templates"; }; + daily_notes = { + date_format = "%Y-%m-%d"; + folder = "Daily"; + }; + workspaces = [ + { + name = "main"; + path = "~/.obsidian/main"; + } + { + name = "journal"; + path = "~/.obsidian/journal"; + } + { + name = "food"; + path = "~/.obsidian/Food"; + } + ]; + }; + }; + }; + }; + }; + }; +} + diff --git a/home/default.nix b/home/default.nix index 8136665..63ef93a 100644 --- a/home/default.nix +++ b/home/default.nix @@ -12,7 +12,8 @@ don = { imports = [ inputs.catppuccin.homeModules.catppuccin - inputs.nixvim.homeModules.nixvim + inputs.nvf.homeManagerModules.default + # inputs.nixvim.homeModules.nixvim ./common ]; home = { -- 2.49.1 From f3eb385fd2d575ebbfdf3e83bfdb9a7de7b04ec5 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Fri, 8 Aug 2025 15:18:22 -0500 Subject: [PATCH 2/3] home/common/nvf | more configs --- home/common/nvf.nix | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/home/common/nvf.nix b/home/common/nvf.nix index 1d9ea21..9a2104c 100644 --- a/home/common/nvf.nix +++ b/home/common/nvf.nix @@ -1,14 +1,23 @@ -{ config, pkgs, nixvim, ... }: { +{ + config, + pkgs, + nixvim, + ... +}: { + home.packages = with pkgs; [tree-sitter fd ripgrep]; programs.nvf = { enable = true; settings = { vim = { autocomplete.nvim-cmp.enable = true; + binds = { + cheatsheet.enable = true; + }; dashboard.alpha = { enable = true; theme = "dashboard"; }; - filetree.neo-tree = { enable = true; }; + filetree.neo-tree = {enable = true;}; comments.comment-nvim.enable = true; autopairs.nvim-autopairs.enable = true; snippets.luasnip.enable = true; @@ -49,18 +58,23 @@ mode = ["n"]; } { - key = "o"; - action = ":Obsidian"; + key = "ow"; + action = ":ObsidianWorkspace"; mode = ["n"]; } { - key = "gg"; - action = ":LazyGit"; + key = "od"; + action = ":ObsidianDailies"; mode = ["n"]; } { - key = "gl"; - action = ":LazyGitLog"; + key = "on"; + action = ":ObsidianNew"; + mode = ["n"]; + } + { + key = "oN"; + action = ":ObsidianNewFromTemplate"; mode = ["n"]; } ]; @@ -86,14 +100,14 @@ html.enable = true; }; lsp = { - enable = true; + enable = true; formatOnSave = true; lspkind.enable = false; lightbulb.enable = true; lspsaga.enable = false; trouble.enable = true; }; - options = { conceallevel = 1; }; + options = {conceallevel = 1;}; statusline.lualine.enable = true; telescope.enable = true; theme = { @@ -108,8 +122,9 @@ enable = true; setupOpts = { legacy_commands = true; + ui.enable = false; completion.nvim-cmp = true; - templates = { subdir = "Templates"; }; + templates = {subdir = "Templates";}; daily_notes = { date_format = "%Y-%m-%d"; folder = "Daily"; @@ -135,4 +150,3 @@ }; }; } - -- 2.49.1 From 3d1fcd26269f00aeb3de137bd0f12e67c88f46b8 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Fri, 8 Aug 2025 15:21:55 -0500 Subject: [PATCH 3/3] final cleanup for nixvim -> nvf + formatting --- flake.nix | 234 ++++++++++++++++++++-------------------- home/common/default.nix | 13 ++- 2 files changed, 129 insertions(+), 118 deletions(-) diff --git a/flake.nix b/flake.nix index 4a41b6c..7c296d4 100644 --- a/flake.nix +++ b/flake.nix @@ -17,122 +17,128 @@ nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nvf.url = "github:notashelf/nvf"; nvf.inputs.nixpkgs.follows = "nixpkgs"; - # nixvim.url = "github:nix-community/nixvim"; - # nixvim.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = inputs@{ self, nixpkgs, nix, nixpkgs-stable, nixos-hardware - , home-manager, catppuccin, colmena, ... }: - let - inherit (self) outputs; - lib = nixpkgs.lib // home-manager.lib; - in { - inherit lib; - nixpkgs.config.allowUnfree = true; - config.allowUnfree = true; - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ "widevine-cdm" ]; - colmena = { - meta = { - nixpkgs = import nixpkgs { system = "x86_64-linux"; }; - specialArgs = { inherit inputs outputs; }; - }; - # ace = import ./hosts/ace/colmena.nix; # Acer C720 - book = import ./hosts/book/colmena.nix; # Google Pixelbook 2017 w/ nvme. - display = import ./hosts/display/colmena.nix; # Pi4 - # eve = import ./hosts/eve/colmena.nix; # Google Pixelbook 2017 w/ eMMC. - fred = import ./hosts/fred/colmena.nix; # acer server - loki = import ./hosts/loki/colmena.nix; # Dell XPS 13 - # pi1 = import ./hosts/pi1/colmena.nix; - # pocket2 = import ./hosts/pocket2/colmena.nix; - smaug = import ./hosts/smaug/colmena.nix; # Thinkpad x260 - w1 = import ./hosts/w1/colmena.nix; # Hetzner VPS - # w2 = import ./hosts/w2/colmena.nix; - }; - - nixosConfigurations = { - # clients - ace = lib.nixosSystem { - modules = [ ./hosts/ace ]; - specialArgs = { inherit inputs outputs; }; - }; - dragon = lib.nixosSystem { - modules = [ ./hosts/dragon ]; - specialArgs = { inherit inputs outputs; }; - }; - eve = lib.nixosSystem { - modules = [ ./hosts/eve ]; - specialArgs = { inherit inputs outputs; }; - }; - loki = lib.nixosSystem { - modules = [ ./hosts/loki ]; - specialArgs = { inherit inputs outputs; }; - }; - - pocket2 = lib.nixosSystem { - modules = [ ./hosts/pocket2 ]; - specialArgs = { inherit inputs outputs; }; - }; - smaug = lib.nixosSystem { - modules = [ ./hosts/smaug ]; - specialArgs = { inherit inputs outputs; }; - }; - t2 = lib.nixosSystem { - modules = [ ./hosts/t2 ]; - specialArgs = { inherit inputs outputs; }; - }; - pi1 = lib.nixosSystem { - modules = [ ./hosts/pi1 ]; - specialArgs = { inherit inputs outputs; }; - }; - - # servers - display = lib.nixosSystem { - modules = [ ./hosts/display ]; - specialArgs = { inherit inputs outputs; }; - }; - fred = lib.nixosSystem { - modules = [ ./hosts/fred ]; - specialArgs = { inherit inputs outputs; }; - }; - vm = lib.nixosSystem { - modules = [ - "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix" - "${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" - ./hosts/vm - ]; - specialArgs = { inherit inputs outputs; }; - }; - harper2 = lib.nixosSystem { - modules = [ ./hosts/harper2 ]; - specialArgs = { inherit inputs outputs; }; - }; - harper = lib.nixosSystem { - modules = [ ./hosts/harper ]; - specialArgs = { inherit inputs outputs; }; - }; - nuwww = lib.nixosSystem { - modules = [ ./hosts/nuwww ]; - specialArgs = { inherit inputs outputs; }; - }; - pihole = lib.nixosSystem { - modules = [ ./hosts/pihole ]; - specialArgs = { inherit inputs outputs; }; - }; - www2 = lib.nixosSystem { - modules = [ ./hosts/www2 ]; - specialArgs = { inherit inputs outputs; }; - }; - w1 = lib.nixosSystem { - modules = [ ./hosts/w1 ]; - specialArgs = { inherit inputs outputs; }; - }; - # w2 = lib.nixosSystem { - # modules = [./hosts/w2]; - # specialArgs = { - # inherit inputs outputs; - # }; - # }; + outputs = inputs @ { + self, + nixpkgs, + nix, + nixpkgs-stable, + nixos-hardware, + home-manager, + catppuccin, + colmena, + ... + }: let + inherit (self) outputs; + lib = nixpkgs.lib // home-manager.lib; + in { + inherit lib; + nixpkgs.config.allowUnfree = true; + config.allowUnfree = true; + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) ["widevine-cdm"]; + colmena = { + meta = { + nixpkgs = import nixpkgs {system = "x86_64-linux";}; + specialArgs = {inherit inputs outputs;}; }; + # ace = import ./hosts/ace/colmena.nix; # Acer C720 + book = import ./hosts/book/colmena.nix; # Google Pixelbook 2017 w/ nvme. + display = import ./hosts/display/colmena.nix; # Pi4 + # eve = import ./hosts/eve/colmena.nix; # Google Pixelbook 2017 w/ eMMC. + fred = import ./hosts/fred/colmena.nix; # acer server + loki = import ./hosts/loki/colmena.nix; # Dell XPS 13 + # pi1 = import ./hosts/pi1/colmena.nix; + # pocket2 = import ./hosts/pocket2/colmena.nix; + smaug = import ./hosts/smaug/colmena.nix; # Thinkpad x260 + w1 = import ./hosts/w1/colmena.nix; # Hetzner VPS + # w2 = import ./hosts/w2/colmena.nix; }; + + nixosConfigurations = { + # clients + ace = lib.nixosSystem { + modules = [./hosts/ace]; + specialArgs = {inherit inputs outputs;}; + }; + dragon = lib.nixosSystem { + modules = [./hosts/dragon]; + specialArgs = {inherit inputs outputs;}; + }; + eve = lib.nixosSystem { + modules = [./hosts/eve]; + specialArgs = {inherit inputs outputs;}; + }; + loki = lib.nixosSystem { + modules = [./hosts/loki]; + specialArgs = {inherit inputs outputs;}; + }; + + pocket2 = lib.nixosSystem { + modules = [./hosts/pocket2]; + specialArgs = {inherit inputs outputs;}; + }; + smaug = lib.nixosSystem { + modules = [./hosts/smaug]; + specialArgs = {inherit inputs outputs;}; + }; + t2 = lib.nixosSystem { + modules = [./hosts/t2]; + specialArgs = {inherit inputs outputs;}; + }; + pi1 = lib.nixosSystem { + modules = [./hosts/pi1]; + specialArgs = {inherit inputs outputs;}; + }; + + # servers + display = lib.nixosSystem { + modules = [./hosts/display]; + specialArgs = {inherit inputs outputs;}; + }; + fred = lib.nixosSystem { + modules = [./hosts/fred]; + specialArgs = {inherit inputs outputs;}; + }; + vm = lib.nixosSystem { + modules = [ + "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix" + "${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" + ./hosts/vm + ]; + specialArgs = {inherit inputs outputs;}; + }; + harper2 = lib.nixosSystem { + modules = [./hosts/harper2]; + specialArgs = {inherit inputs outputs;}; + }; + harper = lib.nixosSystem { + modules = [./hosts/harper]; + specialArgs = {inherit inputs outputs;}; + }; + nuwww = lib.nixosSystem { + modules = [./hosts/nuwww]; + specialArgs = {inherit inputs outputs;}; + }; + pihole = lib.nixosSystem { + modules = [./hosts/pihole]; + specialArgs = {inherit inputs outputs;}; + }; + www2 = lib.nixosSystem { + modules = [./hosts/www2]; + specialArgs = {inherit inputs outputs;}; + }; + w1 = lib.nixosSystem { + modules = [./hosts/w1]; + specialArgs = {inherit inputs outputs;}; + }; + # w2 = lib.nixosSystem { + # modules = [./hosts/w2]; + # specialArgs = { + # inherit inputs outputs; + # }; + # }; + }; + }; } diff --git a/home/common/default.nix b/home/common/default.nix index e27f272..b477465 100644 --- a/home/common/default.nix +++ b/home/common/default.nix @@ -1,4 +1,11 @@ -{ config, pkgs, inputs, osConfig, outputs, ... }: { +{ + config, + pkgs, + inputs, + osConfig, + outputs, + ... +}: { imports = [ ./aerc.nix ./bash.nix @@ -15,7 +22,6 @@ ./naviterm.nix ./newsboat.nix ./nvf.nix - # ./nixvim.nix ./ssh.nix ./taskwarrior.nix ./topgrade.nix @@ -115,8 +121,7 @@ programs.keychain = { enable = true; enableBashIntegration = true; - keys = - "id_aur id_dsa id_ed25519 git C7E41C9F79C846984163693FCCD8E76F07EA701B"; + keys = "id_aur id_dsa id_ed25519 git C7E41C9F79C846984163693FCCD8E76F07EA701B"; }; home.file.".links/links.cfg".source = files/links.cfg; } -- 2.49.1