|
4 | 4 | ... |
5 | 5 | }: |
6 | 6 | let |
7 | | - inherit (lib.modules) importApply; |
8 | 7 | # Added 2025-05-25; warning shown since 2025-08-01 (25.11) |
9 | 8 | # NOTE: top-level binding of a fully resolved value, to avoid printing multiple times |
10 | 9 | homeManagerModulesWarning = lib.warn "nixvim: flake output `homeManagerModules` has been renamed to `homeModules`." null; |
| 10 | + |
| 11 | + # A base configuration used to evaluate the wrapper modules. |
| 12 | + # |
| 13 | + # While we don't define a `pkgs` or `hostPlatform` here, which would normally |
| 14 | + # lead to eval errors, disabling option-declaration checking gives us enough |
| 15 | + # laziness to evaluate the options we need. |
| 16 | + # |
| 17 | + # The `_module.check` module has a key, so we can disable it later in the |
| 18 | + # platform wrapper modules. |
| 19 | + configuration = self.lib.evalNixvim { |
| 20 | + modules = [ |
| 21 | + { |
| 22 | + key = "<internal:nixvim-nocheck-base-eval>"; |
| 23 | + config._module.check = false; |
| 24 | + } |
| 25 | + ]; |
| 26 | + }; |
11 | 27 | in |
12 | 28 | { |
13 | 29 | perSystem = |
|
27 | 43 |
|
28 | 44 | flake = { |
29 | 45 | nixosModules = { |
30 | | - nixvim = importApply ../wrappers/nixos.nix self; |
| 46 | + nixvim = configuration.config.build.nixosModule; |
31 | 47 | default = self.nixosModules.nixvim; |
32 | 48 | }; |
33 | 49 | # Alias for backward compatibility |
34 | 50 | homeManagerModules = lib.mapAttrs (_: lib.seq homeManagerModulesWarning) self.homeModules; |
35 | 51 | homeModules = { |
36 | | - nixvim = importApply ../wrappers/hm.nix self; |
| 52 | + nixvim = configuration.config.build.homeModule; |
37 | 53 | default = self.homeModules.nixvim; |
38 | 54 | }; |
39 | 55 | nixDarwinModules = { |
40 | | - nixvim = importApply ../wrappers/darwin.nix self; |
| 56 | + nixvim = configuration.config.build.nixDarwinModule; |
41 | 57 | default = self.nixDarwinModules.nixvim; |
42 | 58 | }; |
43 | 59 | }; |
|
0 commit comments