jade
de3c854615
Especially with nixpkgs being an extremely uncontrolled variable, we cannot guarantee that the module is always the right version. This will cause support burden, so let's automatically diagnose it.
33 lines
958 B
Nix
33 lines
958 B
Nix
{ pkgs, nixos, lix-module }:
|
|
let
|
|
pkgs' = import pkgs.path {
|
|
inherit (pkgs) system;
|
|
};
|
|
configs = {
|
|
it-builds = nixos ({ ... }: {
|
|
imports = [ lix-module ];
|
|
documentation.enable = false;
|
|
fileSystems."/".device = "ignore-root-device";
|
|
boot.loader.grub.enable = false;
|
|
system.stateVersion = "24.05";
|
|
});
|
|
|
|
# Intentionally provoke the wrong major version.
|
|
# Does assume that the module is one major ahead of the release; the main
|
|
# purpose here is a manual testing fixture.
|
|
wrongMajor = pkgs'.nixos ({ ... }: {
|
|
imports = [ (import ./module.nix { lix = null; }) ];
|
|
documentation.enable = false;
|
|
fileSystems."/".device = "ignore-root-device";
|
|
boot.loader.grub.enable = false;
|
|
system.stateVersion = "24.05";
|
|
});
|
|
};
|
|
in
|
|
{
|
|
inherit configs;
|
|
|
|
it-builds = configs.it-builds.config.system.build.toplevel;
|
|
wrongMajor = configs.wrongMajor.config.system.build.toplevel;
|
|
}
|