-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (25 loc) · 1.11 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
TIME=$(shell date +'%Y.%m.%d %H:%M:%S')
rebuild-switch-home-server: target = [email protected]
rebuild-switch-home-server: build_host = [email protected]
rebuild-switch-hz1: target = [email protected]
rebuild-switch-hz1: build_host = [email protected]
rebuild-switch-sprintbox: target = [email protected]
rebuild-switch-sprintbox: build_host = [email protected]
rebuild-switch-thinkpad-x1-gen9: target = ""
rebuild-switch-thinkpad-x1-gen9: build_host = ""
rebuild-switch-thinkpad-x1-gen7: target = ""
rebuild-switch-thinkpad-x1-gen7: build_host = ""
rebuild-switch-%:
@echo Run nixos-rebuild for machine $* on host: ${target} with build_host: ${build_host}
nixos-rebuild --flake .#$* --build-host ${build_host} --target-host ${target} --use-remote-sudo --fast switch
switch-home-x1-gen9-anton:
home-manager --flake .#thinkpad-x1-gen9-anton switch
switch-home-x1-gen9-anton:
home-manager --flake .#thinkpad-x1-gen7-anton switch
update:
@echo Run nix flake update
nix flake update
@echo Commiting lock file after update
git add ./flake.lock
git add ./flake.nix
git commit -m "update lock file $(TIME)"