First nixosTest in this repo: boots the real tnix configuration in a VM and waits for multi-user.target, extending the existing verify chain (eval/dry-activate) with an actual boot check. Deliberately narrow — no service, network, firewall, or desktop-session assertions. nixosTest supplies pkgs externally, so nixpkgs.config must be forced empty on the test node (configuration.nix's own allowUnfree/ allowUnsupportedSystems would otherwise trip nixpkgs.nix's "externally created instance" assertion); the check's own pkgs is constructed with that config baked in instead. Per-node specialArgs go through _module.args, not node.specialArgs (rejected by testers.nixosTest's makeTest wrapper). Verified by building checks.x86_64-linux.tnix-boot on eu.nixbuild.net (tnix's full closure, including Hyprland/TeXLive, is too large for local iteration on blunix's disk) -- the run completed successfully. flake.lock: routine input bump (home-manager, nixos-hardware, nixpkgs) alongside this work. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CAtPBFEBx3C2QJy6sKGyqd
21 lines
585 B
Nix
21 lines
585 B
Nix
{ pkgs, tnixModules, nodeSpecialArgs }:
|
|
|
|
pkgs.testers.nixosTest {
|
|
name = "tnix-boot";
|
|
|
|
nodes.tnix = {
|
|
_module.args = nodeSpecialArgs;
|
|
imports = tnixModules;
|
|
|
|
# nixosTest supplies pkgs externally (already carrying the config
|
|
# above); configuration.nix's own nixpkgs.config.* then trips
|
|
# nixpkgs.nix's "externally created instance" assertion regardless of
|
|
# whether the values agree, so it must be forced empty here only.
|
|
nixpkgs.config = pkgs.lib.mkForce { };
|
|
};
|
|
|
|
testScript = ''
|
|
start_all()
|
|
tnix.wait_for_unit("multi-user.target")
|
|
'';
|
|
}
|