summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorozpv <39195175+ozpv@users.noreply.github.com>2024-03-27 02:38:10 +0000
committerGitHub <noreply@github.com>2024-03-27 02:38:10 +0000
commitf3cc663bedca46d176041579fd062f89e25217b3 (patch)
treeb41644ca444b474d2815a55609d0f1b089d64c8e
parent85baf135eea17eeaae9da6a9d3268fa6de5f3b0d (diff)
update to nixvim config
-rw-r--r--home.nix34
-rw-r--r--nvim/config/config.nix18
-rw-r--r--nvim/config/default.nix6
-rw-r--r--nvim/flake.lock336
-rw-r--r--nvim/flake.nix51
5 files changed, 414 insertions, 31 deletions
diff --git a/home.nix b/home.nix
index 8b843cc..9c01c0c 100644
--- a/home.nix
+++ b/home.nix
@@ -1,7 +1,9 @@
{ config, pkgs, libs, ... }:
{
- imports = [ ./apps/firefox.nix ];
+ imports = [
+ ./apps/firefox.nix
+ ];
gtk.enable = true;
@@ -26,36 +28,6 @@
EDITOR = "nvim";
};
- programs.neovim = {
- enable = true;
-
- plugins = with pkgs.vimPlugins; [
- comment-nvim
-
- {
- plugin = lualine-nvim;
- type = "lua";
- config = "${builtins.readFile nvim/plugin/lualine.lua}";
- }
- nvim-web-devicons
-
- {
- plugin = gruvbox;
- config = "colorscheme gruvbox";
- }
-
- {
- plugin = nvim-lspconfig;
- type = "lua";
- config = "${builtins.readFile nvim/plugin/lsp.lua}";
- }
- ];
-
- extraLuaConfig = ''
- ${builtins.readFile nvim/options.lua }
- '';
- };
-
programs.home-manager.enable = true;
programs.zsh = {
diff --git a/nvim/config/config.nix b/nvim/config/config.nix
new file mode 100644
index 0000000..d7d0f5b
--- /dev/null
+++ b/nvim/config/config.nix
@@ -0,0 +1,18 @@
+{
+ colorschemes.gruvbox.enable = true;
+
+ plugins = {
+ lsp = {
+ enable = true;
+ servers = {
+ tsserver.enable = true;
+ lua-ls.enable = true;
+ rust-analyzer.enable = true;
+ };
+ };
+ lualine.enable = true;
+ treesitter.enable = true;
+ telescope.enable = true;
+ rust-tools.enable = true;
+ };
+}
diff --git a/nvim/config/default.nix b/nvim/config/default.nix
new file mode 100644
index 0000000..98f387f
--- /dev/null
+++ b/nvim/config/default.nix
@@ -0,0 +1,6 @@
+{
+ # Import all your configuration modules here
+ imports = [
+ ./config.nix
+ ];
+}
diff --git a/nvim/flake.lock b/nvim/flake.lock
new file mode 100644
index 0000000..daf2cc4
--- /dev/null
+++ b/nvim/flake.lock
@@ -0,0 +1,336 @@
+{
+ "nodes": {
+ "devshell": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "nixpkgs": [
+ "nixvim",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1711099426,
+ "narHash": "sha256-HzpgM/wc3aqpnHJJ2oDqPBkNsqWbW0WfWUO8lKu8nGk=",
+ "owner": "numtide",
+ "repo": "devshell",
+ "rev": "2d45b54ca4a183f2fdcf4b19c895b64fbf620ee8",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "devshell",
+ "type": "github"
+ }
+ },
+ "flake-compat": {
+ "locked": {
+ "lastModified": 1696426674,
+ "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+ "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
+ "revCount": 57,
+ "type": "tarball",
+ "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
+ },
+ "original": {
+ "type": "tarball",
+ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
+ }
+ },
+ "flake-compat_2": {
+ "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": "nixpkgs-lib"
+ },
+ "locked": {
+ "lastModified": 1709336216,
+ "narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "type": "github"
+ }
+ },
+ "flake-parts_2": {
+ "inputs": {
+ "nixpkgs-lib": [
+ "nixvim",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1709336216,
+ "narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "type": "github"
+ }
+ },
+ "flake-utils": {
+ "inputs": {
+ "systems": "systems"
+ },
+ "locked": {
+ "lastModified": 1701680307,
+ "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "flake-utils_2": {
+ "inputs": {
+ "systems": "systems_2"
+ },
+ "locked": {
+ "lastModified": 1710146030,
+ "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "gitignore": {
+ "inputs": {
+ "nixpkgs": [
+ "nixvim",
+ "pre-commit-hooks",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1709087332,
+ "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "type": "github"
+ }
+ },
+ "home-manager": {
+ "inputs": {
+ "nixpkgs": [
+ "nixvim",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1711133180,
+ "narHash": "sha256-WJOahf+6115+GMl3wUfURu8fszuNeJLv9qAWFQl3Vmo=",
+ "owner": "nix-community",
+ "repo": "home-manager",
+ "rev": "1c2c5e4cabba4c43504ef0f8cc3f3dfa284e2dbb",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "home-manager",
+ "type": "github"
+ }
+ },
+ "nix-darwin": {
+ "inputs": {
+ "nixpkgs": [
+ "nixvim",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1710717205,
+ "narHash": "sha256-Wf3gHh5uV6W1TV/A8X8QJf99a5ypDSugY4sNtdJDe0A=",
+ "owner": "lnl7",
+ "repo": "nix-darwin",
+ "rev": "bcc8afd06e237df060c85bad6af7128e05fd61a3",
+ "type": "github"
+ },
+ "original": {
+ "owner": "lnl7",
+ "repo": "nix-darwin",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1711333969,
+ "narHash": "sha256-5PiWGn10DQjMZee5NXzeA6ccsv60iLu+Xtw+mfvkUAs=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "57e6b3a9e4ebec5aa121188301f04a6b8c354c9b",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs-lib": {
+ "locked": {
+ "dir": "lib",
+ "lastModified": 1709237383,
+ "narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8",
+ "type": "github"
+ },
+ "original": {
+ "dir": "lib",
+ "owner": "NixOS",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs_2": {
+ "locked": {
+ "lastModified": 1711001935,
+ "narHash": "sha256-URtGpHue7HHZK0mrHnSf8wJ6OmMKYSsoLmJybrOLFSQ=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "20f77aa09916374aa3141cbc605c955626762c9a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixvim": {
+ "inputs": {
+ "devshell": "devshell",
+ "flake-compat": "flake-compat",
+ "flake-parts": "flake-parts_2",
+ "home-manager": "home-manager",
+ "nix-darwin": "nix-darwin",
+ "nixpkgs": "nixpkgs_2",
+ "pre-commit-hooks": "pre-commit-hooks"
+ },
+ "locked": {
+ "lastModified": 1711456788,
+ "narHash": "sha256-Aj9dEP/J/my+WWUlw5JRAjYFZJVOZ08jxYXgNHtbb8E=",
+ "owner": "nix-community",
+ "repo": "nixvim",
+ "rev": "b8b0c1d58f3259dd0236a5844897aeec3b36b73d",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "nixvim",
+ "type": "github"
+ }
+ },
+ "pre-commit-hooks": {
+ "inputs": {
+ "flake-compat": "flake-compat_2",
+ "flake-utils": "flake-utils_2",
+ "gitignore": "gitignore",
+ "nixpkgs": [
+ "nixvim",
+ "nixpkgs"
+ ],
+ "nixpkgs-stable": [
+ "nixvim",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1710923068,
+ "narHash": "sha256-6hOpUiuxuwpXXc/xfJsBUJeqqgGI+JMJuLo45aG3cKc=",
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "rev": "e611897ddfdde3ed3eaac4758635d7177ff78673",
+ "type": "github"
+ },
+ "original": {
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "flake-parts": "flake-parts",
+ "nixpkgs": "nixpkgs",
+ "nixvim": "nixvim"
+ }
+ },
+ "systems": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_2": {
+ "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",
+ "version": 7
+}
diff --git a/nvim/flake.nix b/nvim/flake.nix
new file mode 100644
index 0000000..0138f8e
--- /dev/null
+++ b/nvim/flake.nix
@@ -0,0 +1,51 @@
+{
+ description = "nixvim configuration";
+
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
+ nixvim.url = "github:nix-community/nixvim";
+ flake-parts.url = "github:hercules-ci/flake-parts";
+ };
+
+ outputs = {
+ nixvim,
+ flake-parts,
+ ...
+ } @ inputs:
+ flake-parts.lib.mkFlake {inherit inputs;} {
+ systems = [
+ "x86_64-linux"
+ "aarch64-linux"
+ "x86_64-darwin"
+ "aarch64-darwin"
+ ];
+
+ perSystem = {
+ pkgs,
+ system,
+ ...
+ }: let
+ nixvimLib = nixvim.lib.${system};
+ nixvim' = nixvim.legacyPackages.${system};
+ nixvimModule = {
+ inherit pkgs;
+ module = import ./config; # import the module directly
+ # You can use `extraSpecialArgs` to pass additional arguments to your module files
+ extraSpecialArgs = {
+ # inherit (inputs) foo;
+ };
+ };
+ nvim = nixvim'.makeNixvimWithModule nixvimModule;
+ in {
+ checks = {
+ # Run `nix flake check .` to verify that your config is not broken
+ default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
+ };
+
+ packages = {
+ # Lets you run `nix run .` to start nixvim
+ default = nvim;
+ };
+ };
+ };
+}