-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
53 lines (38 loc) · 1.13 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
# https://github.com/ryan4yin/nix-config/blob/main/Justfile
# use nushell for shell commands
set shell := ["nu", "-c"]
hostname := `cat /etc/hostname`
# show available recipes.
list:
@just --list
rebuild:
nh os switch --ask .
build package *args='':
nom build .#{{package}} {{args}}
nixos-rebuild mode='switch' *args='':
sudo nixos-rebuild {{mode}} --flake .#{{hostname}} {{args}}
build-mobile target='enchilada':
nom build .#nixosConfigurations.{{target}}.config.mobile.outputs.android.android-fastboot-images
up:
nix flake update
# Update specific input
# Usage: just upp nixpkgs
upp input:
nix flake lock --update-input {{input}}
history:
nix profile history --profile /nix/var/nix/profiles/system
repl:
nix repl -f flake:nixpkgs
clean:
# remove all generations older than 7 days
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d
gc:
# garbage collect all unused nix store entries
sudo nix store gc --debug
sudo nix-collect-garbage --delete-old
gitgc:
git reflog expire --expire-unreachable=now --all
git gc --prune=now
fmt:
# format the nix files in this repo
nix fmt