mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-30 22:57:55 +00:00
Gabriel Arazas
5b7dae16d2
The setup's tentative. Unfortunately, still requires the right experimental features enabled.
21 lines
572 B
Nix
21 lines
572 B
Nix
# A set of functions to facilitate testing in the project.
|
|
{ pkgs }:
|
|
|
|
let
|
|
nixpkgsPath = pkgs.path;
|
|
nixosLib = import "${nixpkgsPath}/nixos/lib" { };
|
|
in
|
|
rec {
|
|
# We're not using this to test the hosts configuration (that would be
|
|
# atrocious). We're only using this for NixOS modules.
|
|
nixosTest = test:
|
|
nixosLib.runTest {
|
|
imports = [ test ];
|
|
hostPkgs = pkgs;
|
|
specialArgs = {
|
|
foodogsquaredUtils = import ../lib/utils/nixos.nix { inherit pkgs; };
|
|
foodogsquaredModulesPath = builtins.toString ../modules/nixos;
|
|
};
|
|
};
|
|
}
|