From 1c7e2ff268539bb29140f25d38c4b958e84934b3 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Wed, 24 Jun 2026 12:49:32 -0500 Subject: [PATCH] feat: rebuild optional targets --- home/baseline/nushell/functions.nu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home/baseline/nushell/functions.nu b/home/baseline/nushell/functions.nu index 96da615..9344952 100644 --- a/home/baseline/nushell/functions.nu +++ b/home/baseline/nushell/functions.nu @@ -12,15 +12,15 @@ def --env unlock [] { } } -def rebuild [] { +def rebuild [ $target: string = "switch" ] { if (uname | get operating-system) == "Darwin" { - sudo darwin-rebuild switch + sudo darwin-rebuild $target } else { let hostname = uname | get nodename let build = ^nom build --keep-going $"/etc/nixos#nixosConfigurations.($hostname).config.system.build.toplevel" if $env.LAST_EXIT_CODE == 0 { nvd diff /run/current-system result - run0 result/bin/switch-to-configuration switch + run0 result/bin/switch-to-configuration $target } else { print "Error during build" }