Oops forgot this

This commit is contained in:
2026-01-22 13:21:16 -07:00
parent 020dee9b0f
commit 2fc2e6cd9c
2 changed files with 7 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
.PHONY: init install link unlink rebuild update purge edit help
.PHONY: init install link unlink rebuild update purge edit gen-hardware help
NIXOS_DIR := /etc/nixos
REPO_DIR := $(shell pwd)
@@ -14,6 +14,7 @@ help:
@echo "NixOS Config"
@echo ""
@echo " make init - first time setup"
@echo " make gen-hardware - generate hardware-configuration.nix"
@echo " make rebuild - rebuild nixos"
@echo " make update - upgrade + rebuild"
@echo " make purge - garbage collect"
@@ -22,7 +23,7 @@ help:
@echo " make edit - edit settings.nix"
init:
@./scripts/init.sh
@$(MAKE) --no-print-directory gen-hardware
@$(MAKE) --no-print-directory link
@echo ""
@echo "done. run 'make rebuild' when ready"
@@ -59,5 +60,8 @@ purge:
check:
nix-instantiate '<nixpkgs/nixos>' -A system --dry-run
gen-hardware:
sudo nixos-generate-config --show-hardware-config > hardware-configuration.nix
edit:
@$${EDITOR:-nano} $(SETTINGS)

View File

@@ -9,6 +9,7 @@
"nix:edit" = "$EDITOR /etc/nixos";
"nix:push" = "cd /etc/nixos && git add -A && git commit -m \"$(date -u +%s)\" && git push";
"nix:pull" = "cd /etc/nixos && git pull";
"nix:gen-hardware" = "sudo nixos-generate-config --show-hardware-config > /etc/nixos/hardware-configuration.nix";
# Utilities
"fixaudio" = "systemctl --user restart pipewire pipewire-pulse wireplumber";