-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (31 loc) · 1.33 KB
/
Makefile
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
# Make the host the one in /etc/hostname
host != cat /etc/hostname
# If not found, use skein
host ?= skein
repl:
nix --extra-experimental-features "nix-command flakes repl-flake" --show-trace repl
show:
nix --extra-experimental-features "nix-command flakes" flake show
fmt:
nix --extra-experimental-features "nix-command flakes" fmt
update:
nix --extra-experimental-features "nix-command flakes" flake update
rebuild:
sudo nixos-rebuild switch --show-trace --flake .#$(host)
vm:
rm -rf result
rm -f $(host).qcow2
nix --extra-experimental-features "nix-command flakes" build --show-trace --option eval-cache false .#$(host).vm
iso:
nix --extra-experimental-features "nix-command flakes" build --show-trace --option eval-cache false .#$(host).install-iso
installer:
nix --extra-experimental-features "nix-command flakes" build --show-trace --option eval-cache false .#installers.x86_64-linux.$(host)
hms:
home-manager switch -b backup --extra-experimental-features "nix-command flakes repl-flake" --show-trace --flake .#$(host)
nixprofiles != ls -dv /nix/var/nix/profiles/system-*-link/|tail -2
homeprofiles != ls -dv ~/.local/state/nix/profiles/home-manager-*-link/|tail -2
show-diff:
# ======== System diff ======== ";
nix store diff-closures $(nixprofiles);
# ======== home-manager diff ======== ";
nix store diff-closures $(homeprofiles)