diff --git a/flake-modules/tests.nix b/flake-modules/tests.nix index 6827cd63..8601b7da 100644 --- a/flake-modules/tests.nix +++ b/flake-modules/tests.nix @@ -1,8 +1,4 @@ { - inputs, - self, - ... -}: { perSystem = { pkgs, config, @@ -11,57 +7,27 @@ makeNixvimWithModule, ... }: { - checks = - { - tests = import ../tests { - inherit pkgs; - inherit (pkgs) lib; - makeNixvim = configuration: - makeNixvimWithModuleUnfree { - module = { - config = configuration; - }; + checks = { + tests = import ../tests { + inherit pkgs; + inherit (pkgs) lib; + makeNixvim = configuration: + makeNixvimWithModuleUnfree { + module = { + config = configuration; }; - }; - - extra-args-tests = import ../tests/extra-args.nix { - inherit pkgs; - inherit makeNixvimWithModule; - }; - - lib-tests = import ../tests/lib-tests.nix { - inherit pkgs; - inherit (pkgs) lib; - }; - - home-manager-module = - (import ../tests/modules/hm.nix { - inherit pkgs; - inherit (inputs) home-manager; - nixvim = self; - }) - .activationPackage; - } - // pkgs.lib.optionalAttrs (!pkgs.stdenv.isDarwin) { - nixos-module = - (import ../tests/modules/nixos.nix { - inherit system; - inherit (inputs) nixpkgs; - nixvim = self; - }) - .config - .system - .build - .toplevel; - } - // pkgs.lib.optionalAttrs pkgs.stdenv.isDarwin { - darwin-module = - (import ../tests/modules/darwin.nix { - inherit system; - inherit (inputs) nix-darwin; - nixvim = self; - }) - .system; + }; }; + + extra-args-tests = import ../tests/extra-args.nix { + inherit pkgs; + inherit makeNixvimWithModule; + }; + + lib-tests = import ../tests/lib-tests.nix { + inherit pkgs; + inherit (pkgs) lib; + }; + }; }; } diff --git a/flake-modules/wrappers.nix b/flake-modules/wrappers.nix index d425575c..a9f0a55a 100644 --- a/flake-modules/wrappers.nix +++ b/flake-modules/wrappers.nix @@ -1,4 +1,5 @@ { + inputs, modules, self, ... @@ -9,6 +10,7 @@ }; in { perSystem = { + system, pkgs, pkgsUnfree, config, @@ -25,6 +27,38 @@ in { pkgsUnfree wrapperArgs; }; + + checks = + { + home-manager-module = + (import ../tests/modules/hm.nix { + inherit pkgs; + inherit (inputs) home-manager; + nixvim = self; + }) + .activationPackage; + } + // pkgs.lib.optionalAttrs (!pkgs.stdenv.isDarwin) { + nixos-module = + (import ../tests/modules/nixos.nix { + inherit system; + inherit (inputs) nixpkgs; + nixvim = self; + }) + .config + .system + .build + .toplevel; + } + // pkgs.lib.optionalAttrs pkgs.stdenv.isDarwin { + darwin-module = + (import ../tests/modules/darwin.nix { + inherit system; + inherit (inputs) nix-darwin; + nixvim = self; + }) + .system; + }; }; flake = {