From bf309bb0249429221c8afa9ddf633c58767bb7a1 Mon Sep 17 00:00:00 2001 From: Amir Saeid Date: Sat, 25 Apr 2026 11:43:09 +0100 Subject: Replace neovim with nixvim Also remove Zed editor --- flake.lock | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 23 +++++++--------- modules/dev-tools.nix | 32 +++++++++++++++++++--- 3 files changed, 111 insertions(+), 17 deletions(-) diff --git a/flake.lock b/flake.lock index 78cc1ef..da551d7 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,26 @@ { "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1775087534, + "narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -121,12 +142,49 @@ "type": "github" } }, + "nixpkgs_4": { + "locked": { + "lastModified": 1776255774, + "narHash": "sha256-psVTpH6PK3q1htMJpmdz1hLF5pQgEshu7gQWgKO6t6Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "566acc07c54dc807f91625bb286cb9b321b5f42a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixvim": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_4", + "systems": "systems_3" + }, + "locked": { + "lastModified": 1777080231, + "narHash": "sha256-gpx+FmYpBAO4toBmQzcmdR6gVvVxT969UlB7Xz2jbFA=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "f6fd130ad3b95c3c039fd7f882825c49f7e70bde", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, "root": { "inputs": { "flake-utils": "flake-utils", "home-manager": "home-manager", "nixgl": "nixgl", "nixpkgs": "nixpkgs_3", + "nixvim": "nixvim", "unstable": "unstable" } }, @@ -160,6 +218,21 @@ "type": "github" } }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "unstable": { "locked": { "lastModified": 1772773019, diff --git a/flake.nix b/flake.nix index 87af9f8..dd34119 100644 --- a/flake.nix +++ b/flake.nix @@ -3,18 +3,11 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; - home-manager = { - url = "github:nix-community/home-manager/release-25.11"; - }; - unstable = { - url = "github:NixOS/nixpkgs/nixos-unstable"; - }; - flake-utils = { - url = "github:numtide/flake-utils"; - }; - nixgl = { - url = "github:nix-community/nixGL"; - }; + home-manager.url = "github:nix-community/home-manager/release-25.11"; + unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + nixgl.url = "github:nix-community/nixGL"; + nixvim.url = "github:nix-community/nixvim"; }; outputs = @@ -25,6 +18,7 @@ unstable, flake-utils, nixgl, + nixvim, ... }: let @@ -56,7 +50,10 @@ allowUnfree = false; }; }; - modules = [ ./hosts/${hostname}/home.nix ]; + modules = [ + ./hosts/${hostname}/home.nix + nixvim.homeModules.nixvim + ]; extraSpecialArgs = (mkExtraArgs system) // { inherit hostname; hmLib = home-manager.lib; diff --git a/modules/dev-tools.nix b/modules/dev-tools.nix index b94ad0b..02b9bd6 100644 --- a/modules/dev-tools.nix +++ b/modules/dev-tools.nix @@ -16,14 +16,12 @@ delta fd fzf - godot git haskell.compiler.ghc912 haskellPackages.cabal-install hugo imagemagick jq - neovim ripgrep pass starship @@ -34,7 +32,6 @@ wget z3 zsh - zed-editor unfreePkgs.claude-code ]; @@ -44,7 +41,34 @@ enable = true; }; - programs.zed-editor = { + programs.nixvim = { enable = true; + defaultEditor = true; + viAlias = true; + vimAlias = true; + global = { + mapleader = " "; + }; + opts = { + number = true; + relativenumber = true; + }; + colorschemes.tokyonight = { + enable = true; + settings = { + style = "night"; + transparent = false; + terminal_colors = true; + }; + }; + plugins.lsp = { + enable = true; + servers.metals = { + enable = true; + settings.metals.javaHome = { + __raw = ''vim.fn.system("cs java-home --jvm 21 2>/dev/null"):gsub("%s+$", "")''; + }; + }; + }; }; } -- cgit v1.2.3