2024-12-23 14:44:23 +00:00
|
|
|
{
|
|
|
|
self,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2023-12-06 13:09:26 +01:00
|
|
|
{
|
|
|
|
perSystem =
|
tests/test-derivation: allow tests to be modules
Use `mkTestDerivationFromNixvimModule` instead of `mkTestDerivation`,
allowing "proper" modules to be used instead of plain attr configs.
This is useful for more complex tests that wish to use `config` or
`options` arguments, e.g:
```nix
{config, options, ...}: {
/* some cool test */
}
```
To allow `tests.dontRun` to be defined on such a test, the module is
allowed to be nested as `module`, e.g:
```nix
{
tests.dontRun = true;
module = {config, options, ...}: {
/* a disabled test */
};
}
```
Also ended up doing some general cleanup, removing an unused function,
etc.
2024-06-29 20:16:16 +01:00
|
|
|
{ system, pkgs, ... }:
|
2023-12-06 13:09:26 +01:00
|
|
|
{
|
|
|
|
_module.args = {
|
2024-12-23 14:44:23 +00:00
|
|
|
makeNixvimWithModule = import ../wrappers/standalone.nix {
|
|
|
|
inherit lib self;
|
|
|
|
defaultSystem = system;
|
|
|
|
};
|
2024-01-06 17:57:24 +01:00
|
|
|
};
|
2024-05-05 19:39:35 +02:00
|
|
|
};
|
2023-12-06 13:09:26 +01:00
|
|
|
|
|
|
|
flake = {
|
2024-06-01 00:01:27 +08:00
|
|
|
nixosModules = {
|
2024-07-08 05:51:51 +01:00
|
|
|
nixvim = import ../wrappers/nixos.nix self;
|
2024-06-01 00:01:27 +08:00
|
|
|
default = self.nixosModules.nixvim;
|
|
|
|
};
|
2025-05-25 13:53:15 -04:00
|
|
|
# Alias for backward compatibility
|
|
|
|
# Added 2025-05-25 in https://github.com/nix-community/nixvim/pull/3387
|
|
|
|
homeManagerModules =
|
|
|
|
let
|
|
|
|
cond = lib.trivial.oldestSupportedReleaseIsAtLeast 2505;
|
|
|
|
msg = "nixvim: flake output `homeManagerModules` has been renamed to `homeModules`.";
|
|
|
|
in
|
|
|
|
lib.warnIf cond msg self.homeModules;
|
2025-05-24 18:07:12 -04:00
|
|
|
homeModules = {
|
2024-07-08 05:51:51 +01:00
|
|
|
nixvim = import ../wrappers/hm.nix self;
|
2025-05-24 18:07:12 -04:00
|
|
|
default = self.homeModules.nixvim;
|
2024-06-01 00:01:27 +08:00
|
|
|
};
|
|
|
|
nixDarwinModules = {
|
2024-07-08 05:51:51 +01:00
|
|
|
nixvim = import ../wrappers/darwin.nix self;
|
2024-06-01 00:01:27 +08:00
|
|
|
default = self.nixDarwinModules.nixvim;
|
|
|
|
};
|
2023-12-06 13:09:26 +01:00
|
|
|
};
|
|
|
|
}
|