mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-24 17:23:09 +01:00
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:
parent
4f63c60124
commit
64eb60a1ab
19
lib/test.nix
19
lib/test.nix
@ -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
|
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user