Files
lavitz/Makefile
2026-01-22 11:10:21 -07:00

32 lines
631 B
Makefile

.PHONY: init rebuild update purge help
REPO_DIR := $(shell pwd)
GREEN := \033[0;32m
YELLOW := \033[0;33m
RED := \033[0;31m
NC := \033[0m
help:
@echo "NixOS Config"
@echo ""
@echo " make init - first time setup"
@echo " make rebuild - rebuild nixos with flakes"
@echo " make update - update flake inputs and rebuild"
@echo " make purge - garbage collect"
init:
@./scripts/init.sh
rebuild:
git add .
sudo nixos-rebuild switch --flake .#lavitz
update:
nix flake update
@$(MAKE) --no-print-directory rebuild
purge:
sudo nix-collect-garbage -d
sudo /run/current-system/bin/switch-to-configuration boot