commit 5fd5da95796e8b56be274d2d436e3999c1485568 Author: harry123 Date: Sun Mar 9 10:11:05 2025 +0100 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..bff36b7 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# Nixvim template + +This template gives you a good starting point for configuring nixvim standalone. + +## Configuring + +To start configuring, just add or modify the nix files in `./config`. +If you add a new configuration file, remember to add it to the +[`config/default.nix`](./config/default.nix) file + +## Testing your new configuration + +To test your configuration simply run the following command + +``` +nix run . +``` diff --git a/config/bufferline.nix b/config/bufferline.nix new file mode 100644 index 0000000..2dfee9e --- /dev/null +++ b/config/bufferline.nix @@ -0,0 +1,6 @@ +{ + plugins = { + bufferline.enable = true; + web-devicons.enable = true; + }; +} diff --git a/config/default.nix b/config/default.nix new file mode 100644 index 0000000..0651ed8 --- /dev/null +++ b/config/default.nix @@ -0,0 +1,12 @@ +{ + # Import all your configuration modules here + imports = [ + ./bufferline.nix + ./plugins.nix + ]; + + colorschemes.catppuccin = { + enable = true; + settings.flavour = "latte"; + }; +} diff --git a/config/keys.nix b/config/keys.nix new file mode 100644 index 0000000..1dd514b --- /dev/null +++ b/config/keys.nix @@ -0,0 +1,7 @@ +{ + keymaps = [ + { + action = "CHADopen"; + } + ]; +} diff --git a/config/plugins.nix b/config/plugins.nix new file mode 100644 index 0000000..3b6bf91 --- /dev/null +++ b/config/plugins.nix @@ -0,0 +1,87 @@ +{ + lib, + config, + pkgs, + ... +}: +{ + plugins = { + lsp = { + enable = true; + servers = { + asm_lsp.enable = true; + gopls.enable = true; + java_language_server.enable = true; + rust-analyzer.enable = true; + nil_ls.enable = true; + marksman.enable = true; + }; + }; + + grug-far = { + enable = true; + }; + + conform-nvim = { + enable = true; + }; + + markdown-preview = { + enable = true; + }; + + cmp = { + enable = true; + autoEnableSources = true; + }; + + barbar.enable = true; + gitsigns.enable = true; + + comment = { + enable = true; + }; + + treesitter = { + enable = true; + }; + + web-devicons = { + enable = true; + }; + + emmet = { + enable = true; + }; + + nvim-autopairs = { + enable = true; + }; + + presence-nvim = { + enable = true; + }; + + chadtree = { + enable = true; + }; + + fzf-lua = { + enable = true; + }; + + notify = { + enable = true; + }; + + neotest = { + enable = true; + adapters = { + rust.enable = true; + python.enable = true; + java.enable = true; + go.enable = true; + }; + }; + }; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..2e0ef9e --- /dev/null +++ b/flake.lock @@ -0,0 +1,203 @@ +{ + "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1741352980, + "narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "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" + }, + "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" + } + }, + "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": 1741310760, + "narHash": "sha256-aizILFrPgq/W53Jw8i0a1h1GZAAKtlYOrG/A5r46gVM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "de0fe301211c267807afd11b12613f5511ff7433", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1740877520, + "narHash": "sha256-oiwv/ZK/2FhGxrCkQkB83i7GnWXPPLzoqFHpDD3uYpk=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "147dee35aab2193b174e4c0868bd80ead5ce755c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1738797219, + "narHash": "sha256-KRwX9Z1XavpgeSDVM/THdFd6uH8rNm/6R+7kIbGa+2s=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1da52dd49a127ad74486b135898da2cef8c62665", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixvim": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs_2", + "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" + } + }, + "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" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..833b0d3 --- /dev/null +++ b/flake.nix @@ -0,0 +1,47 @@ +{ + description = "A nixvim configuration"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-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 = + { system, ... }: + let + nixvimLib = nixvim.lib.${system}; + nixvim' = nixvim.legacyPackages.${system}; + nixvimModule = { + inherit system; # or alternatively, set `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; + }; + }; + }; +}