From 3c1c20d8c12438e97e2654b65f2f5638ad4192ad Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 18 Feb 2026 12:48:13 -0800 Subject: [PATCH] nixos: add switch-local recipe --- nixos/justfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nixos/justfile b/nixos/justfile index 2167871e..bfd06f21 100644 --- a/nixos/justfile +++ b/nixos/justfile @@ -8,6 +8,15 @@ switch *args: fi' sudo nixos-rebuild switch --flake "git+https://github.com/colonelpanic8/dotfiles.git?ref=master&dir=nixos#" --impure --option warn-dirty false {{args}} +switch-local *args: + # Switch using the local working tree (includes uncommitted edits). + bash -lc 'if systemctl is-active --quiet nixos-rebuild-switch-to-configuration.service; then \ + echo "nixos-rebuild switch already running; waiting..." >&2; \ + systemctl status nixos-rebuild-switch-to-configuration.service --no-pager >&2 || true; \ + while systemctl is-active --quiet nixos-rebuild-switch-to-configuration.service; do sleep 1; done; \ + fi' + sudo nixos-rebuild switch --flake ".#" --impure --option warn-dirty false {{args}} + switch-local-taffybar *args: # Like `switch`, but use the local taffybar checkout (useful when hacking on it). # Note: requires the submodule/checkout to exist at ../dotfiles/config/taffybar/taffybar.