2022-11-30 23:38:47 +03:00
|
|
|
NIX_RUN := sudo nix run .\#
|
|
|
|
NIX_LOCK := nix flake lock
|
|
|
|
|
|
|
|
DEPS_MY := \
|
|
|
|
myneovim \
|
|
|
|
mytools \
|
2022-12-12 21:52:21 +03:00
|
|
|
vnetod \
|
|
|
|
wd2
|
2022-11-30 23:38:47 +03:00
|
|
|
|
|
|
|
DEPS_NIXOS := \
|
|
|
|
nixpkgs \
|
|
|
|
hardware \
|
|
|
|
home-manager \
|
|
|
|
agenix
|
|
|
|
|
|
|
|
DEPS_MISC := \
|
|
|
|
wired \
|
|
|
|
nil \
|
|
|
|
mailserver
|
|
|
|
|
|
|
|
MACHINES := \
|
|
|
|
home \
|
|
|
|
asus-gl553vd
|
|
|
|
|
|
|
|
VPS := \
|
|
|
|
magenta
|
|
|
|
|
|
|
|
help:
|
|
|
|
cat Makefile
|
|
|
|
|
|
|
|
define machine_rule
|
2023-01-04 23:43:54 +03:00
|
|
|
$(1): ;
|
|
|
|
systemctl --user reset-failed
|
|
|
|
$$(NIX_RUN)switch/$(1)
|
|
|
|
|
2022-11-30 23:38:47 +03:00
|
|
|
$(1)-test: ; $$(NIX_RUN)test/$(1)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define vps_rule
|
2022-12-01 11:10:13 +03:00
|
|
|
$(1): ; $$(NIX_RUN)deploy/$(1)
|
2022-11-30 23:38:47 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach machine,$(MACHINES),$(eval $(call machine_rule,$(machine))))
|
|
|
|
$(foreach vps,$(VPS),$(eval $(call vps_rule,$(vps))))
|
|
|
|
|
|
|
|
deps-bump-my:
|
|
|
|
$(NIX_LOCK) $(foreach dep,$(DEPS_MY),--update-input $(dep))
|
|
|
|
|
|
|
|
deps-bump-nixos:
|
|
|
|
$(NIX_LOCK) $(foreach dep,$(DEPS_NIXOS),--update-input $(dep))
|
|
|
|
|
|
|
|
deps-bump-misc:
|
|
|
|
$(NIX_LOCK) $(foreach dep,$(DEPS_MISC),--update-input $(dep))
|
|
|
|
|