-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (33 loc) · 931 Bytes
/
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
.POSIX:
.PHONY: default build test diff update install
default: build
build:
sudo nixos-rebuild \
--flake '.#${host}' \
switch
test:
nixos-rebuild \
--flake '.#${host}' \
build-vm
./result/bin/run-${host}-vm
diff:
nixos-rebuild \
--flake '.#${host}' \
build
nix store diff-closures \
--allow-symlinked-store \
/nix/var/nix/profiles/system ./result
update:
nix flake update
install:
nixos-generate-config --no-filesystems --show-hardware-config > 'hosts/${host}/hardware-configuration.nix'
git add . && git diff --staged
# This consumes significant memory on the live USB because dependencies are
# downloaded to tmpfs. The configuration must be small, or the machine must
# have a lot of RAM.
sudo nix \
--extra-experimental-features 'nix-command flakes' \
run 'github:nix-community/disko/latest#disko-install' -- \
--write-efi-boot-entries \
--flake '.#${host}' \
--disk main '${disk}'