-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·66 lines (47 loc) · 1.48 KB
/
Copy pathMakefile
File metadata and controls
executable file
·66 lines (47 loc) · 1.48 KB
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
64
65
66
host?=$(shell hostname)
HOSTS_PATH=./hosts
TARGET=${host}
check-target:
ifeq ("$(host)", "")
$(error "Host not set")
endif
check-env:
ifeq ("${IN_NIX_SHELL}", "")
$(error "Not in Nix shell")
endif
echo In Nix shell: ${IN_NIX_SHELL}
lint: check-env
alejandra .
update:
nix flake update
nixos.install: check-env check-target
sudo nixos-install --flake .#${TARGET}
echo "Don't forget to run sudo nixos-enter to assign a password to davidnuon!"
nixos.run-disko: check-env check-target
sudo disko --mode destroy,format,mount ./hosts/${TARGET}/disk-config.nix
nixos.build: check-env check-target
sudo nixos-rebuild build --flake .#${TARGET}
nixos.dry-build: check-env check-target
sudo nixos-rebuild dry-build --flake .#${TARGET}
nixos.switch: check-env check-target
sudo nixos-rebuild switch --flake .#${TARGET}
nixos.test: check-env check-target
sudo nixos-rebuild test --flake .#${TARGET}
nixos.boot: check-env check-target
sudo nixos-rebuild boot --flake .#${TARGET}
nixos.upgrade: check-env check-target update nixos.build
sudo nixos-rebuild switch --flake .#${TARGET}
nixos.build-vm: check-env
sudo nixos-rebuild build-vm --flake .#${HOSTS_PATH}/vm.nix
iso.blackleg: check-env
nix build .#dn-blackleg-iso
iso.microwave: check-env
nix build .#dn-microwave-iso
vhd.blackleg: check-env
nix build .#dn-blackleg-vhd
vhd.microwave: check-env
nix build .#dn-microwave-vhd
iso.installer: check-env
nix build .#dn-installer-iso
vhd.installer: check-env
nix build .#dn-installer-vhd