From 4af658a0aed60fbbedbffdd33f07d984190b2626 Mon Sep 17 00:00:00 2001 From: noe Date: Sat, 30 Mar 2024 01:39:34 -0400 Subject: [PATCH] justfile: add deploy2 --- Justfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Justfile b/Justfile index f1fb9cf..ec16045 100644 --- a/Justfile +++ b/Justfile @@ -75,6 +75,10 @@ deploy target_host extra_flags="": @test -f nixos/hosts/{{target_host}}/.target || { echo "Host cannot be deployed, add a .target file with SSH destination"; exit 1; } ssh -A `cat nixos/hosts/{{target_host}}/.target` sudo nixos-rebuild switch {{extra_flags}} --accept-flake-config --flake \"git+https://codeberg.org/noe/nixos.git?ref={{branch}}\&rev={{commit}}#{{target_host}}\" +deploy2 target_host extra_flags="": + @test -f nixos/hosts/{{target_host}}/.target || { echo "Host cannot be deployed, add a .target file with SSH destination"; exit 1; } + nixos-rebuild switch {{extra_flags}} --target-host root@`cat nixos/hosts/{{target_host}}/.target` --accept-flake-config --flake .#{{target_host}} + # ssh target_host *args='': @test -f nixos/hosts/{{target_host}}/.target || { echo "Cannot SSH, add a .target file with SSH destination"; exit 1; }