-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
43 lines (31 loc) · 1.15 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
#
# Nix commands related to local machine
#
allswitch system user:
@sudo nixos-rebuild switch --flake '{{ system }}' --show-trace --verbose && home-manager switch --flake '{{ user }}'
osboot flake:
@sudo nixos-rebuild boot --flake '{{ flake }}' --show-trace --verbose
osswitch flake:
@sudo nixos-rebuild switch --flake '{{ flake }}' --show-trace --verbose
oshistory:
@nix profile history --profile /nix/var/nix/profiles/system
osgc:
@sudo nix profile wipe-history --older-than 3d --profile /nix/var/nix/profiles/system
@sudo nix store gc --debug
osgcnow:
@sudo nix profile wipe-history --profile /nix/var/nix/profiles/system
@sudo nix store gc --debug
hmswitch flake:
@home-manager switch --flake '{{ flake }}'
hmhistory:
@home-manager generations
hmgc:
@home-manager expire-generations -3 days
@sudo nix store gc --debug
hmgcnow:
@home-manager generations | cut -d' ' -f5 | tail +2 | xargs home-manager remove-generations
@sudo nix store gc --debug
remote-switch flake target:
nixos-rebuild switch --flake '{{ flake }}' --target-host '{{ target }}' --show-trace --verbose
update:
@nix flake update