meta: Inline tests lib

The tests lib wasn't doing that much anyway and Nix flake checks are
just derivations that build successfully.
This commit is contained in:
Donovan Glover 2024-09-01 12:52:20 -04:00
parent 4f63c60124
commit 64eb60a1ab
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 13 additions and 23 deletions

View File

@ -1,19 +0,0 @@
test:
{ self, pkgs }:
let
inherit (pkgs.lib) mkDefault;
nixos-lib = import (pkgs.path + "/nixos/lib") { };
in
(nixos-lib.runTest {
imports = [ test ];
hostPkgs = pkgs;
defaults.documentation.enable = mkDefault false;
node.specialArgs = {
nix-config = self;
};
}).config.result

View File

@ -1,13 +1,22 @@
{ self, pkgs }:
let let
inherit (builtins) attrValues; nixos-lib = import (pkgs.path + "/nixos/lib") { };
in in
(import ../lib/test.nix) { (nixos-lib.runTest {
name = "neovim"; name = "neovim";
hostPkgs = pkgs;
defaults.documentation.enable = pkgs.lib.mkDefault false;
node.specialArgs = {
nix-config = self;
};
nodes.machine = nodes.machine =
{ nix-config, ... }: { nix-config, ... }:
{ {
imports = attrValues { imports = builtins.attrValues {
inherit (nix-config.nixosModules) desktop system shell; inherit (nix-config.nixosModules) desktop system shell;
customConfig = { customConfig = {
@ -51,4 +60,4 @@ in
assert "Hello world" in text assert "Hello world" in text
''; '';
} }).config.result