-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
55 lines (44 loc) · 1.45 KB
/
justfile
File metadata and controls
55 lines (44 loc) · 1.45 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
set shell := ["bash", "-uc"]
os := os()
ax52 := 'ax52'
runner-host := 'bench-seed-root'
[private]
default:
just --list
# Build configuration without deploying
[group('test')]
build type=ax52:
nixos-rebuild build --flake .#{{type}} --show-trace
# Build VM for testing
[group('test')]
build-vm type=ax52:
nixos-rebuild build-vm --flake .#{{type}} --show-trace
# Show what would change without building
[group('test')]
dry-run type=ax52:
nixos-rebuild dry-run --flake .#{{type}} --show-trace
# Deploy a seed node to a machine
[group('live')]
deploy type=ax52 host=runner-host:
nixos-anywhere --flake .#{{type}} {{host}}
# Rebuild a seed node on a machine
[group('live')]
rebuild type=ax52 host=runner-host:
nixos-rebuild switch --flake .#{{type}} --target-host {{host}} --impure
# Copy flake to remote and build remotely
[group('live')]
sync type=ax52 host=runner-host:
rsync -av --delete --exclude=result* --exclude=*.dat --exclude=.git . {{host}}:/etc/nixos-config/
ssh {{host}} "chown -R root:root /etc/nixos-config && cd /etc/nixos-config && nixos-rebuild switch --flake .#{{type}}"
# SSH into the host
[group('live')]
ssh host=runner-host:
ssh {{host}}
# Get bitcoind logs
[group('live')]
logs host=runner-host:
ssh {{host}} "tail -F /var/lib/bitcoind-mainnet/debug.log"
# run a bitcoin-cli command on bitcoind
[group('live')]
bcli command host=runner-host:
ssh {{host}} "bitcoin-cli -datadir=/var/lib/bitcoind-mainnet {{command}}"