From a141198878a2d1190c1a5917202750769afdfeef Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Fri, 7 Mar 2025 13:42:52 +0800 Subject: [PATCH] feat(nixvim): add nixvim --- flake.lock | 130 +++++++++++++++++++++++++++++- flake.nix | 3 + users/modules/programs/nixvim.nix | 24 ++++++ users/modules/sh.nix | 3 +- 4 files changed, 158 insertions(+), 2 deletions(-) create mode 100644 users/modules/programs/nixvim.nix diff --git a/flake.lock b/flake.lock index 74a34f7..f26704b 100644 --- a/flake.lock +++ b/flake.lock @@ -49,6 +49,27 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1738453229, + "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems_2" @@ -67,6 +88,24 @@ "type": "github" } }, + "flake-utils_2": { + "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" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -368,6 +407,34 @@ "type": "github" } }, + "ixx": { + "inputs": { + "flake-utils": [ + "nixvim", + "nuschtosSearch", + "flake-utils" + ], + "nixpkgs": [ + "nixvim", + "nuschtosSearch", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729958008, + "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", + "owner": "NuschtOS", + "repo": "ixx", + "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "ref": "v0.0.6", + "repo": "ixx", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1739020877, @@ -416,6 +483,51 @@ "type": "github" } }, + "nixvim": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ], + "nuschtosSearch": "nuschtosSearch" + }, + "locked": { + "lastModified": 1741098523, + "narHash": "sha256-gXDSXDr6tAb+JgxGMvcEjKC9YO8tVOd8hMMZHJLyQ6Q=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "03065fd4708bfdf47dd541d655392a60daa25ded", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils", + "ixx": "ixx", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1738508923, + "narHash": "sha256-4DaDrQDAIxlWhTjH6h/+xfG05jt3qDZrZE/7zDLQaS4=", + "owner": "NuschtOS", + "repo": "search", + "rev": "86e2038290859006e05ca7201425ea5b5de4aecb", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat", @@ -444,6 +556,7 @@ "home-manager": "home-manager", "hyprland": "hyprland", "nixpkgs": "nixpkgs_2", + "nixvim": "nixvim", "yazi": "yazi" } }, @@ -498,6 +611,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" + } + }, "xdph": { "inputs": { "hyprland-protocols": [ @@ -541,7 +669,7 @@ }, "yazi": { "inputs": { - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs_3", "rust-overlay": "rust-overlay" }, diff --git a/flake.nix b/flake.nix index f8edd8e..63ca96d 100644 --- a/flake.nix +++ b/flake.nix @@ -51,5 +51,8 @@ hyprland.url = "github:hyprwm/Hyprland"; yazi.url = "github:sxyazi/yazi"; + + nixvim.url = "github:nix-community/nixvim"; + nixvim.inputs.nixpkgs.follows = "nixpkgs"; }; } diff --git a/users/modules/programs/nixvim.nix b/users/modules/programs/nixvim.nix new file mode 100644 index 0000000..72edaf6 --- /dev/null +++ b/users/modules/programs/nixvim.nix @@ -0,0 +1,24 @@ +{ inputs, ... }: { + imports = [ inputs.nixvim.homeManagerModules.nixvim ]; + programs.nixvim = { + enable = true; + defaultEditor = true; + vimdiffAlias = true; + extraConfigLua = ""; + extraPlugins = []; + + opts = { + shiftwidth = 2; + number = true; + relativenumber = true; + }; + + colorschemes = { + catppuccin.enable = true; + }; + + plugins = { + lualine.enable = true; + }; + }; +} diff --git a/users/modules/sh.nix b/users/modules/sh.nix index ae21430..281501e 100644 --- a/users/modules/sh.nix +++ b/users/modules/sh.nix @@ -5,7 +5,8 @@ ./programs/direnv.nix ./programs/fzf.nix ./programs/git.nix - ./programs/nvim.nix + #./programs/nvim.nix + ./programs/nixvim.nix ./programs/starship.nix ./programs/tealdeer.nix ./programs/tmux.nix