-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.justfile
48 lines (38 loc) · 913 Bytes
/
.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
[private]
default:
@just --choose
export NIX_CONFIG := "
extra-experimental-features = flakes nix-command
"
# wrapper around {nixos,darwin}-rebuild, always taking the flake
[macos]
[private]
rebuild *args:
darwin-rebuild --flake . {{ args }} |& nom
[linux]
[private]
rebuild *args:
sudo nixos-rebuild --flake . {{ args }} |& nom
build *args:
@sudo true
@just rebuild build {{ args }} && nvd diff /run/current-system result
[linux]
boot *args:
@just rebuild boot {{ args }}
[macos]
check *args:
@just rebuild check {{ args }}
[linux]
check *args:
@just rebuild test {{ args }}
switch *args:
@just build {{ args }}
@just confirm-switch {{ args }}
[confirm]
[private]
confirm-switch *args:
@just rebuild switch {{ args }}
clean:
sudo nix-env --profile /nix/var/nix/profiles/system --delete-generations old
nix-collect-garbage -d
nix store optimise