-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
69 lines (55 loc) · 1.71 KB
/
justfile
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
# Like GNU `make`, but `just` rustier.
# https://just.systems/
# run `just` from this directory to see available commands
HOSTNAME := 'hostname'
# Default command when 'just' is run without arguments
default:
@just --list
# Update nix flake
[group('Main')]
update:
nix flake update
# Lint nix files
[group('dev')]
lint:
nix fmt
# Check nix flake
[group('dev')]
check:
nix flake check
# build the configuration for current host
[group('Main')]
build:
nixos-rebuild build --option eval-cache false --use-remote-sudo --flake .#${HOSTNAME} -L --show-trace
# switch the configuration for current host
[group('Main')]
switch:
nixos-rebuild switch --option eval-cache false --use-remote-sudo --flake .#${HOSTNAME} -L --show-trace
# rebuild for current host in test mode
[group('Main')]
test:
nixos-rebuild test --use-remote-sudo --flake .#${HOSTNAME} -L
# update nix flake and switch for current host
[group('Main')]
upgrade: update switch
# build custom NixOS ISO
[group('Main')]
iso:
nix build .#nixosConfigurations.ISO.config.system.build.isoImage --show-trace
# build the setup for the current host as VM
[group('VM')]
system-vm:
nixos-rebuild build-vm --flake .#${HOSTNAME}
# nixos-rebuild build-vm-with-bootloader --flake .#${HOSTNAME}
# build balodil test VM
[group('VM')]
balodil:
nixos-rebuild build-vm --flake .#balodil
# build VM nixetcup
[group('VM')]
nixetcup:
nixos-rebuild switch -j auto --use-remote-sudo --build-host localhost --target-host [email protected] --flake ".#nixetcup" --show-trace
# build and deploy config for pi-mcrover
[group('Main')]
deploy-pi-mcrover:
nixos-rebuild switch -j auto --use-remote-sudo --build-host localhost --target-host [email protected] --flake ".#pi-rover"