diff --git a/ci.nix b/ci.nix index cdb3198..3c49ab1 100644 --- a/ci.nix +++ b/ci.nix @@ -3,6 +3,6 @@ let in { test = pkgs.writeScript "test" '' #!/bin/sh - nix-build "${toString ./tests/test.nix}"; + nix-build "${toString ./tests}"; ''; } diff --git a/flake.nix b/flake.nix index 3e7263a..488933d 100644 --- a/flake.nix +++ b/flake.nix @@ -9,11 +9,11 @@ }; checks.x86_64-linux = let pkgs = nixpkgs.legacyPackages.x86_64-linux; - in { + in # Run tests: nix flake check -L - nixos-test = pkgs.callPackage ./tests/test.nix { + import ./tests { + inherit pkgs; makeTest = import (pkgs.path + "/nixos/tests/make-test-python.nix"); }; - }; }; } diff --git a/tests/default.nix b/tests/default.nix new file mode 100644 index 0000000..3b24ba6 --- /dev/null +++ b/tests/default.nix @@ -0,0 +1,8 @@ +{ makeTest ? import +, pkgs ? (import {}) +}@args: +{ + luks-lvm = import ./luks-lvm.nix args; + mdadm = import ./mdadm.nix args; + zfs = import ./zfs.nix args; +}