From 2b9176ded17090df0a33fb70464ec6b90a503075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kha=C3=AFs=20COLIN?= Date: Mon, 26 Aug 2024 14:14:23 +0200 Subject: [PATCH] chore: move nixvim to own repository --- flake.lock | 13 +- flake.nix | 2 +- nixvim/README.md | 17 -- nixvim/config/bufferline.nix | 5 - nixvim/config/clipboard.nix | 6 - nixvim/config/cmp.nix | 19 -- nixvim/config/dap.nix | 188 -------------------- nixvim/config/default.nix | 29 --- nixvim/config/extra_config.lua | 7 - nixvim/config/lsp.nix | 32 ---- nixvim/config/lualine.nix | 5 - nixvim/config/nix.nix | 3 - nixvim/config/oil.nix | 9 - nixvim/config/options.nix | 22 --- nixvim/config/telescope.nix | 82 --------- nixvim/config/test.lua | 1 - nixvim/config/toggleterm.nix | 8 - nixvim/config/treesitter.nix | 5 - nixvim/config/which-key.nix | 3 - nixvim/flake.lock | 313 --------------------------------- nixvim/flake.nix | 50 ------ 21 files changed, 9 insertions(+), 810 deletions(-) delete mode 100644 nixvim/README.md delete mode 100644 nixvim/config/bufferline.nix delete mode 100644 nixvim/config/clipboard.nix delete mode 100644 nixvim/config/cmp.nix delete mode 100644 nixvim/config/dap.nix delete mode 100644 nixvim/config/default.nix delete mode 100644 nixvim/config/extra_config.lua delete mode 100644 nixvim/config/lsp.nix delete mode 100644 nixvim/config/lualine.nix delete mode 100644 nixvim/config/nix.nix delete mode 100644 nixvim/config/oil.nix delete mode 100644 nixvim/config/options.nix delete mode 100644 nixvim/config/telescope.nix delete mode 100644 nixvim/config/test.lua delete mode 100644 nixvim/config/toggleterm.nix delete mode 100644 nixvim/config/treesitter.nix delete mode 100644 nixvim/config/which-key.nix delete mode 100644 nixvim/flake.lock delete mode 100644 nixvim/flake.nix diff --git a/flake.lock b/flake.lock index 4c9edd0..aa3289d 100644 --- a/flake.lock +++ b/flake.lock @@ -491,14 +491,17 @@ "nixvim": "nixvim_2" }, "locked": { - "lastModified": 1, + "lastModified": 1724674505, "narHash": "sha256-QB4MH0l0Pb57F+ClG0NR9xZJdUExT/S1VDFey2bh2y8=", - "path": "nixvim", - "type": "path" + "ref": "refs/heads/master", + "rev": "f4ea68f9faf9221859a9d3f2a6a7dbecc38edeeb", + "revCount": 1, + "type": "git", + "url": "ssh://gitsrht@git.sourcehut.005540.xyz/~logistic-bot/nixvim" }, "original": { - "path": "nixvim", - "type": "path" + "type": "git", + "url": "ssh://gitsrht@git.sourcehut.005540.xyz/~logistic-bot/nixvim" } }, "nixvim_2": { diff --git a/flake.nix b/flake.nix index e15c26a..852ba1e 100644 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,7 @@ }; nixvim = { - url = "path:nixvim"; + url = "git+ssh://gitsrht@git.sourcehut.005540.xyz/~logistic-bot/nixvim"; inputs.nixpkgs.follows = "nixpkgs-unstable"; }; diff --git a/nixvim/README.md b/nixvim/README.md deleted file mode 100644 index bff36b7..0000000 --- a/nixvim/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# 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/nixvim/config/bufferline.nix b/nixvim/config/bufferline.nix deleted file mode 100644 index fe5cf05..0000000 --- a/nixvim/config/bufferline.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.bufferline = { - enable = true; - }; -} diff --git a/nixvim/config/clipboard.nix b/nixvim/config/clipboard.nix deleted file mode 100644 index 2dd2be8..0000000 --- a/nixvim/config/clipboard.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - clipboard = { - providers.xsel.enable = true; - register = "unnamedplus"; - }; -} diff --git a/nixvim/config/cmp.nix b/nixvim/config/cmp.nix deleted file mode 100644 index a2fd9c4..0000000 --- a/nixvim/config/cmp.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - plugins.cmp = { - enable = true; - autoEnableSources = true; - settings = { - sources = [ - { name = "nvim_lsp"; } - { name = "path"; } - { name = "buffer"; } - ]; - - mapping = { - "" = "cmp.mapping.confirm({ select = true })"; - "" = "cmp.mapping(cmp.mapping.select_next_item({'i', 's'}))"; - "" = "cmp.mapping(cmp.mapping.select_prev_item({'i', 's'}))"; - }; - }; - }; -} diff --git a/nixvim/config/dap.nix b/nixvim/config/dap.nix deleted file mode 100644 index 9d1235c..0000000 --- a/nixvim/config/dap.nix +++ /dev/null @@ -1,188 +0,0 @@ -{ - plugins.dap = { - enable = true; - extensions = { - dap-ui.enable = true; - dap-virtual-text.enable = true; - }; - adapters = { - executables = { - gdb = { - command = "gdb"; - args = [ "-i" "dap" ]; - }; - }; - }; - configurations = { - c = [ - { - name = "Launch"; - type = "gdb"; - request = "launch"; - program.__raw = # lua - '' - function() - return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. '/', "file") - end - ''; - args.__raw = # lua - '' - function() - return vim.fn.input("Args: ", "", "file") - end - ''; - cwd = ''''${workspacefolder}''; - stopOnEntry = false; - } - ]; - }; - }; - - keymaps = [ - { - mode = "n"; - key = "db"; - action = ":DapToggleBreakpoint"; - options.desc = "Toggle Breakpoint"; - } - { - mode = "n"; - key = "dc"; - action = ":DapContinue"; - options.desc = "Continue"; - } - { - mode = "n"; - key = "da"; - action = "lua require('dap').continue({ before = get_args })"; - options = { - silent = true; - desc = "Run with Args"; - }; - } - { - mode = "n"; - key = "dC"; - action = "lua require('dap').run_to_cursor()"; - options = { - silent = true; - desc = "Run to cursor"; - }; - } - { - mode = "n"; - key = "dg"; - action = "lua require('dap').goto_()"; - options = { - silent = true; - desc = "Go to line (no execute)"; - }; - } - { - mode = "n"; - key = "di"; - action = ":DapStepInto"; - options = { - silent = true; - desc = "Step into"; - }; - } - { - mode = "n"; - key = "dj"; - action = " - lua require('dap').down() - "; - options = { - silent = true; - desc = "Down"; - }; - } - { - mode = "n"; - key = "dk"; - action = "lua require('dap').up()"; - options = { - silent = true; - desc = "Up"; - }; - } - { - mode = "n"; - key = "dl"; - action = "lua require('dap').run_last()"; - options = { - silent = true; - desc = "Run Last"; - }; - } - { - mode = "n"; - key = "do"; - action = ":DapStepOut"; - options = { - silent = true; - desc = "Step Out"; - }; - } - { - mode = "n"; - key = "dO"; - action = ":DapStepOver"; - options = { - silent = true; - desc = "Step Over"; - }; - } - { - mode = "n"; - key = "dp"; - action = "lua require('dap').pause()"; - options = { - silent = true; - desc = "Pause"; - }; - } - { - mode = "n"; - key = "dr"; - action = ":DapToggleRepl"; - options = { - silent = true; - desc = "Toggle REPL"; - }; - } - { - mode = "n"; - key = "ds"; - action = "lua require('dap').session()"; - options = { - silent = true; - desc = "Session"; - }; - } - { - mode = "n"; - key = "dt"; - action = ":DapTerminate"; - options = { - silent = true; - desc = "Terminate"; - }; - } - { - mode = "n"; - key = "du"; - action.__raw = # lua - '' - function() - require("dapui").toggle() - end - ''; - options = { - desc = "Toggle Debugger UI"; - silent = true; - }; - } - ]; -} diff --git a/nixvim/config/default.nix b/nixvim/config/default.nix deleted file mode 100644 index cc4e38b..0000000 --- a/nixvim/config/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - # Import all your configuration modules here - imports = [ - # base config - ./options.nix - ./clipboard.nix - - # appearence - ./bufferline.nix - ./lualine.nix - ./which-key.nix - ./toggleterm.nix - - # file and search utilities - ./telescope.nix - ./oil.nix - - # language support & lsp - ./lsp.nix - ./treesitter.nix - ./nix.nix - - # debugging - ./dap.nix - - # autocompletion - ./cmp.nix - ]; -} diff --git a/nixvim/config/extra_config.lua b/nixvim/config/extra_config.lua deleted file mode 100644 index cc6b422..0000000 --- a/nixvim/config/extra_config.lua +++ /dev/null @@ -1,7 +0,0 @@ -require('telescope-all-recent').setup({ - default = { - disable = false; - use_cwd = true, - sorting = "frecency", - } -}) diff --git a/nixvim/config/lsp.nix b/nixvim/config/lsp.nix deleted file mode 100644 index 87a9b22..0000000 --- a/nixvim/config/lsp.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - plugins.lsp = { - enable = true; - inlayHints = true; - servers = { - nixd.enable = true; - cssls.enable = true; - html.enable = true; - rust-analyzer = { - enable = true; - installRustc = true; - installCargo = true; - }; - bashls.enable = true; - clangd.enable = true; - }; - keymaps = { - diagnostic = { - "" = "goto_next"; - "" = "goto_prev"; - }; - lspBuf = { - "K" = "hover"; - "gD" = "references"; - "gd" = "definition"; - "gi" = "implementation"; - "gt" = "type_definition"; - "" = "code_action"; - }; - }; - }; -} diff --git a/nixvim/config/lualine.nix b/nixvim/config/lualine.nix deleted file mode 100644 index 015eb2a..0000000 --- a/nixvim/config/lualine.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.lualine = { - enable = true; - }; -} diff --git a/nixvim/config/nix.nix b/nixvim/config/nix.nix deleted file mode 100644 index ba302bf..0000000 --- a/nixvim/config/nix.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - plugins.nix.enable = true; -} diff --git a/nixvim/config/oil.nix b/nixvim/config/oil.nix deleted file mode 100644 index 99cdd2d..0000000 --- a/nixvim/config/oil.nix +++ /dev/null @@ -1,9 +0,0 @@ -# https://nix-community.github.io/nixvim/plugins/oil/ -{ - plugins.oil = { - enable = true; - settings = { - delete_to_trash = true; - }; - }; -} diff --git a/nixvim/config/options.nix b/nixvim/config/options.nix deleted file mode 100644 index d6edf76..0000000 --- a/nixvim/config/options.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - opts = { - number = true; - }; - - globals.mapleader = " "; - - performance.byteCompileLua = { - enable = true; - nvimRuntime = true; - plugins = true; - }; - - performance.combinePlugins = { - enable = true; - standalonePlugins = [ - "hmts.nvim" - "nvim-treesitter" - "vimplugin-treesitter-grammar-nix" - ]; - }; -} diff --git a/nixvim/config/telescope.nix b/nixvim/config/telescope.nix deleted file mode 100644 index 7fc6eff..0000000 --- a/nixvim/config/telescope.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ pkgs, ... }: -{ - plugins.telescope = { - enable = true; - extensions.file-browser = { - enable = true; - # explanation: see :help expand - # % is current file path, :p is full, :h is head (last component removed) - settings.cwd.__raw = "'%:p:h'"; - }; - settings.defaults.mappings = { - i = { - # close telescope when escape pressed in insert mode - "" = "close"; - }; - }; - keymaps = { - # files - "" = { - action = "find_files"; - options = { - desc = "Find files in current directory"; - }; - }; - "ff" = { - action = "file_browser"; - options = { - desc = "Find files in current directory"; - }; - }; - "fr" = { - action = "oldfiles"; - options = { - desc = "Recent files"; - }; - }; - - # search - "/" = { - action = "live_grep"; - options = { - desc = "Grep (root dir)"; - }; - }; - - # buffers - "b" = { - action = "buffers"; - options = { - desc = "Buffer list"; - }; - }; - - # lsp - "sD" = { - action = "diagnostics"; - options = { - desc = "Workspace diagnostics"; - }; - }; - }; - }; - extraPlugins = [ - # frecency ranking - (pkgs.vimUtils.buildVimPlugin { - name = "telescope-all-recent"; - src = pkgs.fetchFromGitHub { - owner = "prochri"; - repo = "telescope-all-recent.nvim"; - rev = "267e9e5fd13a6e9a4cc6ffe00452d446d040401d"; - hash = "sha256-EYU7HazKcABAGnJ3iqGqM2n+XTo64L1uqoopL/XuLFg="; - }; - }) - # dependency for telescope-all-recent: sqlite - pkgs.vimPlugins.sqlite-lua - ]; - extraConfigLua = (builtins.readFile ./extra_config.lua); - # use telescope in more places - plugins.dressing = { - enable = true; - }; -} diff --git a/nixvim/config/test.lua b/nixvim/config/test.lua deleted file mode 100644 index f8b507a..0000000 --- a/nixvim/config/test.lua +++ /dev/null @@ -1 +0,0 @@ -require('telescope').find_files() diff --git a/nixvim/config/toggleterm.nix b/nixvim/config/toggleterm.nix deleted file mode 100644 index c79c06c..0000000 --- a/nixvim/config/toggleterm.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - plugins.toggleterm = { - enable = true; - settings = { - open_mapping = "[[]]"; - }; - }; -} diff --git a/nixvim/config/treesitter.nix b/nixvim/config/treesitter.nix deleted file mode 100644 index d15124b..0000000 --- a/nixvim/config/treesitter.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.treesitter = { - enable = true; - }; -} diff --git a/nixvim/config/which-key.nix b/nixvim/config/which-key.nix deleted file mode 100644 index 6d02309..0000000 --- a/nixvim/config/which-key.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - plugins.which-key.enable = true; -} diff --git a/nixvim/flake.lock b/nixvim/flake.lock deleted file mode 100644 index 61bfa69..0000000 --- a/nixvim/flake.lock +++ /dev/null @@ -1,313 +0,0 @@ -{ - "nodes": { - "devshell": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1722113426, - "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", - "owner": "numtide", - "repo": "devshell", - "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", - "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-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1719994518, - "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719994518, - "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "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" - } - }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "nixvim", - "flake-compat" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ], - "nixpkgs-stable": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1721042469, - "narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "f451c19376071a90d8c58ab1a953c6e9840527fd", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "nixvim", - "git-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": 1722407237, - "narHash": "sha256-wcpVHUc2nBSSgOM7UJSpcRbyus4duREF31xlzHV5T+A=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "58cef3796271aaeabaed98884d4abaab5d9d162d", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "nix-darwin": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1722082646, - "narHash": "sha256-od8dBWVP/ngg0cuoyEl/w9D+TCNDj6Kh4tr151Aax7w=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "0413754b3cdb879ba14f6e96915e5fdf06c6aab6", - "type": "github" - }, - "original": { - "owner": "lnl7", - "repo": "nix-darwin", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1721924956, - "narHash": "sha256-Sb1jlyRO+N8jBXEX9Pg9Z1Qb8Bw9QyOgLDNMEpmjZ2M=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "5ad6a14c6bf098e98800b091668718c336effc95", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1719876945, - "narHash": "sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI=", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz" - } - }, - "nixvim": { - "inputs": { - "devshell": "devshell", - "flake-compat": "flake-compat", - "flake-parts": "flake-parts_2", - "git-hooks": "git-hooks", - "home-manager": "home-manager", - "nix-darwin": "nix-darwin", - "nixpkgs": [ - "nixpkgs" - ], - "nuschtosSearch": "nuschtosSearch", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1722492816, - "narHash": "sha256-aZe7oSm/+GM1whS6bxZy+DJgbcy8rDIkygBA0owCvmU=", - "owner": "nix-community", - "repo": "nixvim", - "rev": "820f8d58eafd7121989fea3ae9e71f29699d856b", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixvim", - "type": "github" - } - }, - "nuschtosSearch": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1722144272, - "narHash": "sha256-olZbfaEdd+zNPuuyYcYGaRzymA9rOmth8yXOlVm+LUs=", - "owner": "NuschtOS", - "repo": "search", - "rev": "16565307c267ec219c2b5d3494ba66df08e7d403", - "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" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1722330636, - "narHash": "sha256-uru7JzOa33YlSRwf9sfXpJG+UAV+bnBEYMjrzKrQZFw=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "768acdb06968e53aa1ee8de207fd955335c754b7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/nixvim/flake.nix b/nixvim/flake.nix deleted file mode 100644 index 65d2e2a..0000000 --- a/nixvim/flake.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - description = "A nixvim configuration"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixvim = { - url = "github:nix-community/nixvim"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - 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; - }; - }; - }; -}