-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjustfile
More file actions
77 lines (61 loc) · 2.37 KB
/
justfile
File metadata and controls
77 lines (61 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
set dotenv-load := true
default:
@just --list
# --- box targets -------------------------------------------------------------
# One-shot onboarding: pick box once, idempotent. Repos always prompts. Pass 'force' to redo.
go handle='' mode='':
#!/usr/bin/env bash
set -euo pipefail
h="$(./scripts/pick-handle.sh '{{ handle }}')"
./scripts/go.sh "$h" '{{ mode }}'
# Apply the flake to a computer
switch handle='':
#!/usr/bin/env bash
set -euo pipefail
h="$(./scripts/pick-handle.sh '{{ handle }}')"
./scripts/bootstrap.sh "$h"
# Push laptop-side gh auth onto the box (for private repos)
auth handle='':
#!/usr/bin/env bash
set -euo pipefail
h="$(./scripts/pick-handle.sh '{{ handle }}')"
./scripts/auth-apply.sh "$h"
# Copy agent credentials (claude + codex) onto a computer
agent handle='':
#!/usr/bin/env bash
set -euo pipefail
h="$(./scripts/pick-handle.sh '{{ handle }}')"
./scripts/pick-agent.sh "$h"
# Create a new computer using COMPUTER_SIZE + COMPUTER_DISK_GIB from .env
create handle:
computer create --size ${COMPUTER_SIZE} --storage ${COMPUTER_DISK_GIB:-30} {{ handle }}
# --- manifests ---------------------------------------------------------------
# Declaratively apply ./secrets.json. Pass 'force' to hard-overwrite.
secrets handle='' mode='':
#!/usr/bin/env bash
set -euo pipefail
h="$(./scripts/pick-handle.sh '{{ handle }}')"
./scripts/secrets-apply.sh "$h" secrets.json '{{ mode }}'
# Interactive picker: generates secrets.json (run once, then commit)
secrets-init:
./scripts/secrets-init.sh
# Declaratively apply ./repos.json. Safe by default (ff-only). Pass 'force' for hard reset.
repos handle='' mode='':
#!/usr/bin/env bash
set -euo pipefail
h="$(./scripts/pick-handle.sh '{{ handle }}')"
./scripts/repos-apply.sh "$h" repos.json '{{ mode }}'
# Interactive picker: generates repos.json (run once, then commit)
repos-init:
./scripts/repos-init.sh
# --- dev ---------------------------------------------------------------------
# Format every *.nix file with nixfmt
fmt:
nix --extra-experimental-features 'nix-command flakes' fmt
# Evaluate the flake (catch broken modules before switching)
check:
nix --extra-experimental-features 'nix-command flakes' flake check --no-build
# Shellcheck every script in scripts/
lint:
nix --extra-experimental-features 'nix-command flakes' shell nixpkgs#shellcheck \
-c shellcheck scripts/*.sh