-
Notifications
You must be signed in to change notification settings - Fork 3
/
.justfile
52 lines (41 loc) · 977 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
49
50
51
52
[private]
default:
@just --choose
export NIX_CONFIG := "
accept-flake-config = true
extra-experimental-features = flakes nix-command
"
# wrapper around {nixos,darwin}-rebuild, always taking the flake
[private]
[macos]
rebuild *args:
darwin-rebuild --flake . {{args}} |& nom
[private]
[linux]
rebuild *args:
sudo nixos-rebuild --flake . {{args}} |& nom
build *args:
@sudo true
@just rebuild build {{args}} && nvd diff /run/current-system result
home *args:
nix run ".#homeConfigurations.winston.activationPackage" {{args}}
[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