system/Makefile
Dmitriy Pleshevskiy dab505e62b nix: use 22.11 stable nixpkgs (#13)
nix: refac overlays

nix: fix path to packages

nix: use mkMerge

nix: rename nixpkgs-unstable input

user: remove my tools

user: build use unstable packages for nil

cannot be built on stable because it requires rustc 1.66 or newer, while the currently active rustc version is 1.64.0

host/magenta: use unstable gitea

nix: fix rollback command

nix: fix overlays

user: use unstable haskell packages to build xmonad

user: don't build woodpecker-cli

host: import nix module for canigou and magenta

pkgs: fix woodpecker

host/home: use unstable kernel to use rtl88x2bu driver

host: use unstable ipfs

move ipfs to shared config

user: use unstable woodpecker-cli

Reviewed-on: #13
2023-03-31 17:40:22 +03:00

71 lines
1.1 KiB
Makefile

NIX_RUN := sudo nix run .\#
NIX_LOCK := nix flake lock
DEPS_MY := \
myneovim \
mytools \
vnetod \
wd2
DEPS_NIXOS := \
nixpkgs \
nixpkgs-unstable \
hardware \
home-manager \
agenix
DEPS_MISC := \
wired \
nil \
mailserver
MACHINES := \
home \
asus-gl553vd
VPS := \
magenta \
canigou
.PHONY: help
help:
cat Makefile
define machine_rule
.PHONY: $(1)
$(1): ;
systemctl --user reset-failed
$$(NIX_RUN)switch/$(1)
.PHONY: rollback-$(1)
rollback-$(1):
$$(NIX_RUN)rollback/$(1)
.PHONY: test-$(1)
test-$(1): ; $$(NIX_RUN)test/$(1)
endef
define vps_rule
.PHONY: $(1)
$(1): ; $$(NIX_RUN)deploy/$(1)
.PHONY: rollback-$(1)
rollback-$(1):
$$(NIX_RUN)rollback/$(1)
endef
$(foreach machine,$(MACHINES),$(eval $(call machine_rule,$(machine))))
$(foreach vps,$(VPS),$(eval $(call vps_rule,$(vps))))
.PHONY: deps-my
deps-my:
$(NIX_LOCK) $(foreach dep,$(DEPS_MY),--update-input $(dep))
.PHONY: deps-nixos
deps-nixos:
$(NIX_LOCK) $(foreach dep,$(DEPS_NIXOS),--update-input $(dep))
.PHONY: deps-misc
deps-misc:
$(NIX_LOCK) $(foreach dep,$(DEPS_MISC),--update-input $(dep))