1eec3bc4456a
fix doctor config-syntax check (dry-build) and diff exit propagation; golden enables flakes + nixpkgs-fmt + pinned nixpkgs registry; v3.0.2
- time
- 2026-05-29 17:11 UTC · 4 months ago
- machine
- koh2
- parent
- 751b9272cb67
↓ nina-1eec3bc4.tar.gzatlas at this save
files changed4 files
build.zig.zon+1 −1src/commands.zig+2 −2src/exec.zig+1 −1test/vm/configuration.nix+10 −0build.zig.zon+1 −1
@@ -9,7 +9,7 @@99 .name = .nina,1010 // This is a [Semantic Version](https://semver.org/).1111 // In a future version of Zig it will be used for package deduplication.12- .version = "3.0.1",12+ .version = "3.0.2",1313 // Together with name, this represents a globally unique package1414 // identifier. This field is generated by the Zig toolchain when the1515 // package is first created, and then *never changes*. This allowssrc/commands.zig+2 −2
@@ -155,10 +155,10 @@155155 const a = std.fmt.parseInt(u32, ctx.args[0], 10) catch current - 1;156156 const b = std.fmt.parseInt(u32, ctx.args[1], 10) catch current;157157 output.diffHeader(a, b, ctx.machine.name);158- _ = try exec.diffClosures(ctx.io, &ctx.machine, ctx.gpa, a, b);158+ if (try exec.diffClosures(ctx.io, &ctx.machine, ctx.gpa, a, b) != 0) return error.ProcessFailed;159159 } else {160160 output.diffHeader(if (prev > 0) prev else current - 1, current, ctx.machine.name);161- _ = try exec.diffClosures(ctx.io, &ctx.machine, ctx.gpa, if (prev > 0) prev else current - 1, current);161+ if (try exec.diffClosures(ctx.io, &ctx.machine, ctx.gpa, if (prev > 0) prev else current - 1, current) != 0) return error.ProcessFailed;162162 }163163 }164164 src/exec.zig+1 −1
@@ -604,7 +604,7 @@604604 605605 // Check config syntax606606 {607- const r = try capture(gpa, io, machine, &.{ "sudo", "nixos-rebuild", "build", "--dry-run" });607+ const r = try capture(gpa, io, machine, &.{ "sudo", "nixos-rebuild", "dry-build" });608608 defer gpa.free(r.stdout);609609 defer gpa.free(r.stderr);610610 try checks.append(gpa, .{ .name = "config syntax", .status = if (r.exit_code == 0) .ok else .fail });test/vm/configuration.nix+10 −0
@@ -28,7 +28,17 @@2828 vim2929 htop3030 ripgrep31+ nixpkgs-fmt # nina fmt3132 ];33+34+ # nina search/diff/pkg use the new `nix` CLI (flakes). Pin the nixpkgs flake35+ # registry to the local channel path so `nix search nixpkgs` resolves offline36+ # instead of fetching github per disposable overlay.37+ nix.settings.experimental-features = [ "nix-command" "flakes" ];38+ nix.registry.nixpkgs.to = {39+ type = "path";40+ path = pkgs.path;41+ };3242 3343 # Headless driving: autologin root on the serial console so the build/boot3444 # harness can run commands without credentials.