|
4 | 4 | nvf.url = "github:notashelf/nvf"; |
5 | 5 | }; |
6 | 6 |
|
7 | | - outputs = { |
8 | | - self, |
9 | | - nixpkgs, |
10 | | - ... |
11 | | - } @ inputs: let |
| 7 | + outputs = {nixpkgs, ...} @ inputs: let |
12 | 8 | # An abstraction over systems to easily provide the same package |
13 | 9 | # for multiple systems. This is preferable to abstraction libraries. |
14 | | - forEachSystem = nixpkgs.lib.genAttrs ["x86_64-linux"]; |
| 10 | + forEachSystem = nixpkgs.lib.genAttrs [ |
| 11 | + "x86_64-linux" |
| 12 | + "aarch64-linux" |
| 13 | + ]; |
15 | 14 | in { |
16 | 15 | packages = forEachSystem (system: let |
17 | 16 | pkgs = inputs.nixpkgs.legacyPackages.${system}; |
18 | | - |
19 | | - # A module to be evaluated via lib.evalModules inside nvf's module system. |
20 | | - # All options supported by nvf will go under config.vim to create the final |
21 | | - # wrapped package. You may also add some new *options* under options.* to |
22 | | - # expand the module system. |
23 | | - configModule = { |
24 | | - # You may browse available options for nvf on the online manual. Please see |
25 | | - # <https://notashelf.github.io/nvf/options.html> |
26 | | - config.vim = { |
27 | | - theme.enable = true; |
28 | | - |
29 | | - lsp = { |
30 | | - # Enable LSP functionality globally. This is required for modules found |
31 | | - # in `vim.languages` to enable relevant LSPs. |
32 | | - enable = true; |
33 | | - |
34 | | - # You may define your own LSP configurations using `vim.lsp.servers` in |
35 | | - # nvf without ever needing lspconfig to do it. This will use the native |
36 | | - # API provided by Neovim > 0.11 |
37 | | - servers = {}; |
38 | | - }; |
39 | | - |
40 | | - # Language support and automatic configuration of companion plugins. |
41 | | - # Note that enabling, e.g., languages.<lang>.diagnostics will automatically |
42 | | - # enable top-level options such as enableLSP or enableExtraDiagnostics as |
43 | | - # they are needed. |
44 | | - languages = { |
45 | | - enableFormat = true; |
46 | | - enableTreesitter = true; |
47 | | - enableExtraDiagnostics = true; |
48 | | - |
49 | | - # Nix language and diagnostics. |
50 | | - nix.enable = true; |
51 | | - }; |
52 | | - }; |
53 | | - }; |
54 | | - |
55 | | - # Evaluate any and all modules to create the wrapped Neovim package. |
56 | | - neovimConfigured = inputs.nvf.lib.neovimConfiguration { |
57 | | - inherit pkgs; |
58 | | - |
59 | | - modules = [ |
60 | | - # Configuration module to be imported. You may define multiple modules |
61 | | - # or even import them from other files (e.g., ./modules/lsp.nix) to |
62 | | - # better modularize your configuration. |
63 | | - configModule |
64 | | - ]; |
65 | | - }; |
66 | 17 | in { |
67 | 18 | # Packages to be exposed under packages.<system>. Those can accessed |
68 | 19 | # directly from package outputs in other flakes if this flake is added |
69 | 20 | # as an input. You may run those packages with 'nix run .#<package>' |
70 | | - default = self.packages.${system}.neovim; |
71 | | - neovimConfigured = neovimConfigured.neovim; |
| 21 | + default = |
| 22 | + (inputs.nvf.lib.neovimConfiguration { |
| 23 | + inherit pkgs; |
| 24 | + |
| 25 | + modules = [ |
| 26 | + # Configuration module to be imported. You may define multiple modules |
| 27 | + # or even import them from other files (e.g., ./modules/lsp.nix) to |
| 28 | + # better modularize your configuration. |
| 29 | + ./configuration.nix |
| 30 | + ]; |
| 31 | + }).neovim; |
72 | 32 | }); |
73 | 33 | }; |
74 | 34 | } |
0 commit comments