From 85216d6290ace55be4b7b3ac5cb7cbe232023763 Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Wed, 22 Apr 2026 19:34:07 +0100 Subject: [PATCH] just diffing and triplet --- flake.lock | 10 +++++----- flake.nix | 3 ++- justfile | 24 ++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 17d0c68..05bb0dc 100644 --- a/flake.lock +++ b/flake.lock @@ -1056,16 +1056,16 @@ }, "systems_5": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1776166891, + "narHash": "sha256-bI8yrEGjrohR5hkQox7UrxDH7XqrYMwI8SL/LrJ1+S8=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "triplet", + "rev": "6de7bc09397911ce03636afbcf6118745ab2cda0", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "triplet", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 42e6015..d119ff1 100644 --- a/flake.nix +++ b/flake.nix @@ -95,6 +95,7 @@ nvf cachix jq + nvd devour-flake agenix deadnix @@ -173,7 +174,7 @@ flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs"; - systems.url = "github:nix-systems/default"; + systems.url = "github:nix-systems/triplet"; treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/justfile b/justfile index 7378e8f..4581637 100644 --- a/justfile +++ b/justfile @@ -21,3 +21,27 @@ update: cache: devour-flake . | cachix push callumio-public + +_build host: + @nix build .#nixosConfigurations.{{host}}.config.system.build.toplevel --no-link --print-out-paths + +baseline: + @just _build artemis > /tmp/artemis.before + @just _build hermes > /tmp/hermes.before + @echo "baseline saved:" + @echo " artemis → $(cat /tmp/artemis.before)" + @echo " hermes → $(cat /tmp/hermes.before)" + +# baseline one host +baseline-host host: + @just _build {{host}} > /tmp/{{host}}.before + @echo "{{host}} baseline → $(cat /tmp/{{host}}.before)" + +# diff one host against its saved baseline +diff-host host: + @nvd diff $(cat /tmp/{{host}}.before) $(just _build {{host}}) + +# diff both hosts +diff: + @just diff-host artemis + @just diff-host hermes