Maybe this
This commit is contained in:
15
Makefile
15
Makefile
@@ -1,9 +1,7 @@
|
||||
.PHONY: init install link unlink rebuild update purge edit help
|
||||
.PHONY: install link unlink rebuild update purge help
|
||||
|
||||
NIXOS_DIR := /etc/nixos
|
||||
REPO_DIR := $(shell pwd)
|
||||
SETTINGS := settings.nix
|
||||
|
||||
# Colors for output
|
||||
GREEN := \033[0;32m
|
||||
YELLOW := \033[0;33m
|
||||
@@ -13,19 +11,11 @@ NC := \033[0m # No Color
|
||||
help:
|
||||
@echo "NixOS Config"
|
||||
@echo ""
|
||||
@echo " make init - first time setup"
|
||||
@echo " make rebuild - rebuild nixos"
|
||||
@echo " make update - upgrade + rebuild"
|
||||
@echo " make purge - garbage collect"
|
||||
@echo " make link - symlink to /etc/nixos"
|
||||
@echo " make unlink - remove symlink"
|
||||
@echo " make edit - edit settings.nix"
|
||||
|
||||
init:
|
||||
@./scripts/init.sh
|
||||
@$(MAKE) --no-print-directory link
|
||||
@echo ""
|
||||
@echo "done. run 'make rebuild' when ready"
|
||||
|
||||
link:
|
||||
@if [ -L "$(NIXOS_DIR)" ]; then \
|
||||
@@ -59,6 +49,3 @@ purge:
|
||||
|
||||
check:
|
||||
nixos-rebuild build --flake . --dry-run
|
||||
|
||||
edit:
|
||||
@$${EDITOR:-nano} $(SETTINGS)
|
||||
|
||||
Reference in New Issue
Block a user