From 4ebcb2b860c3c3e7ad36ba8d81fe51efffdc9186 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sat, 26 Jul 2025 10:52:12 -0400 Subject: [PATCH] Simplify justfile --- justfile | 50 ++++++++++++++++++++------------------------------ 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/justfile b/justfile index e24d337..ed41114 100644 --- a/justfile +++ b/justfile @@ -1,55 +1,45 @@ default: @just --list +# Main commands +# -------------------------------------------------------------------------------------------------- # Activate local configuration (home if exists, else system) [group('main')] activate: - if [ -f ./configurations/home/$USER@$HOSTNAME.nix ]; then \ - set -x; nix run . $USER@$HOSTNAME; \ + @if [ -f ./configurations/home/$USER@$HOSTNAME.nix ]; then \ + just deploy $USER@$HOSTNAME; \ else \ - set -x; nix run . $HOSTNAME; \ + just deploy $HOSTNAME; \ fi # Update primary flame inputs +[group('main')] update: nix run .#update -# Deploy to Beelink -[group('deploy')] -pureintent: - nix run . pureintent +# Deploy to a given host +[group('main')] +deploy host: + @echo "Deploying to {{host}} ..." + @nix run . {{host}} -# Deploy to infinitude (mac) -[group('deploy')] -infinitude: - nix run . infinitude +# Run all pre-commit hooks on all files +[group('main')] +lint: + pre-commit run --all-files -# Activate home config on stillness -[group('deploy')] -stillness: - nix run . $USER@ -# Deploy to orb nixos machine -# [group('deploy')] -# orb: -# nix run . orb-nixos - -# Deploy to tart VM -[group('deploy')] -tart: - nix run . infinitude-nixos +# Misc commands +# -------------------------------------------------------------------------------------------------- # SSH to tart CM -[group('ssh')] +[group('misc')] tart-ssh: ssh $(tart ip nixos-vm) -# Run all pre-commit hooks on all files -pca: - pre-commit run --all-files - # https://discourse.nixos.org/t/why-doesnt-nix-collect-garbage-remove-old-generations-from-efi-menu/17592/4 +[group('misc')] fuckboot: sudo nix-collect-garbage -d - sudo /run/current-system/bin/switch-to-configuration boot + sudo /run/current-system/bin/switch-to-configuration boot \ No newline at end of file