From 4143694ce771e585ac8d9a3c8a26500697bcbd1e Mon Sep 17 00:00:00 2001 From: imbytecat Date: Sat, 11 Apr 2026 01:52:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20Justfile=20?= =?UTF-8?q?=E7=AE=80=E5=8C=96=E5=B8=B8=E7=94=A8=E5=91=BD=E4=BB=A4=EF=BC=8C?= =?UTF-8?q?=E5=AE=89=E8=A3=85=20just?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Justfile | 35 +++++++++++++++++++++++++++++++++++ home/default.nix | 1 + 2 files changed, 36 insertions(+) create mode 100644 Justfile diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..b8600fc --- /dev/null +++ b/Justfile @@ -0,0 +1,35 @@ +# List all commands +default: + @just --list + +# Rebuild current macOS host (auto-detect from hostname) +[macos] +darwin: + #!/usr/bin/env bash + attr=$(scutil --get LocalHostName | tr '[:upper:]' '[:lower:]' | sed 's/awesome-//') + sudo darwin-rebuild switch --flake .#"$attr" + +# Rebuild WSL host +[linux] +nixos: + sudo nixos-rebuild switch --flake .#wsl + +# Update all flake inputs +update: + nix flake update + +# Edit encrypted secrets +secrets: + sops secrets/secrets.yaml + +# Garbage-collect old generations +gc: + nix-collect-garbage -d + +# Show flake outputs +show: + nix flake show + +# Check flake for errors +check: + nix flake check --no-build diff --git a/home/default.nix b/home/default.nix index ef8ef7e..5dabbd7 100644 --- a/home/default.nix +++ b/home/default.nix @@ -44,6 +44,7 @@ nix-output-monitor # nom nvd # nix version diff nh # nix helper + just # Secrets management sops