-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
63 lines (51 loc) · 1.17 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
hostname := `scutil --get LocalHostName`
# List all commands
default:
@just --list
# Update all flakes
[group("nix")]
up:
nix flake update
# Update specific flake
# Example:
# just upp nixpkgs
[group("nix")]
upp input:
nix flake update {{input}}
# Nix Repl
[group("nix")]
repl:
nix repl -f flake:nixpkgs
# List all generations
[group("nix")]
history:
nix profile history --profile /nix/var/nix/profiles/system
# Remove old generations thats older then 7 days
[group("nix")]
clean:
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d
# Garbage collection
[group("nix")]
gc:
# Garbage collection system-wide
sudo nix-collect-garbage --delete-older-than 7d
# Garbage collect for the user aka home-manager
nix-collect-garbage --delete-older-than 7d
[group("nix")]
fmt:
nix fmt
[group("nix")]
gcroot:
ls -al /nix/var/nix/gcroots/auto/
# Macos Specific commands
# Restart launchpad to force reindexing
[macos]
[group("desktop")]
restart-launchpad:
defaults write com.apple.dock RestartLaunchPad -bool true
killall Dock
# Rebuild and switch
[macos]
[group("desktop")]
rb:
darwin-rebuild switch --flake .