From e5b38cd2c117b47bfbf7964f0627d55ae1de0d11 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Fri, 30 May 2025 19:15:48 +0200 Subject: [PATCH] justfile: add repl, eval and eval-vm --- justfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/justfile b/justfile index d9dbebd..93aefea 100644 --- a/justfile +++ b/justfile @@ -22,6 +22,14 @@ run-vm machine=`just _a_machine` *_: | gum choose --no-limit --height=15 \ | xargs -L 1 nix flake lock --update-input "$@" +@repl $machine=`just _a_machine` *_: + set -v; nixos-rebuild --flake .#"$machine" repl "${@:2}" + +@eval $machine=`just _a_machine` $attrpath="system.build.toplevel.outPath" *_: + set -v; nix eval {{nix_eval_opts}} ".#nixosConfigurations.\"$machine\".config.$attrpath" --show-trace "${@:3}" + +@eval-vm $machine=`just _a_machine` $attrpath="system.build.toplevel.outPath" *_: + just eval "$machine" "virtualisation.vmVariant.$attrpath" "${@:3}" # helpers