Oops forgot this
This commit is contained in:
8
Makefile
8
Makefile
@@ -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
|
NIXOS_DIR := /etc/nixos
|
||||||
REPO_DIR := $(shell pwd)
|
REPO_DIR := $(shell pwd)
|
||||||
@@ -14,6 +14,7 @@ help:
|
|||||||
@echo "NixOS Config"
|
@echo "NixOS Config"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " make init - first time setup"
|
@echo " make init - first time setup"
|
||||||
|
@echo " make gen-hardware - generate hardware-configuration.nix"
|
||||||
@echo " make rebuild - rebuild nixos"
|
@echo " make rebuild - rebuild nixos"
|
||||||
@echo " make update - upgrade + rebuild"
|
@echo " make update - upgrade + rebuild"
|
||||||
@echo " make purge - garbage collect"
|
@echo " make purge - garbage collect"
|
||||||
@@ -22,7 +23,7 @@ help:
|
|||||||
@echo " make edit - edit settings.nix"
|
@echo " make edit - edit settings.nix"
|
||||||
|
|
||||||
init:
|
init:
|
||||||
@./scripts/init.sh
|
@$(MAKE) --no-print-directory gen-hardware
|
||||||
@$(MAKE) --no-print-directory link
|
@$(MAKE) --no-print-directory link
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "done. run 'make rebuild' when ready"
|
@echo "done. run 'make rebuild' when ready"
|
||||||
@@ -59,5 +60,8 @@ purge:
|
|||||||
check:
|
check:
|
||||||
nix-instantiate '<nixpkgs/nixos>' -A system --dry-run
|
nix-instantiate '<nixpkgs/nixos>' -A system --dry-run
|
||||||
|
|
||||||
|
gen-hardware:
|
||||||
|
sudo nixos-generate-config --show-hardware-config > hardware-configuration.nix
|
||||||
|
|
||||||
edit:
|
edit:
|
||||||
@$${EDITOR:-nano} $(SETTINGS)
|
@$${EDITOR:-nano} $(SETTINGS)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
"nix:edit" = "$EDITOR /etc/nixos";
|
"nix:edit" = "$EDITOR /etc/nixos";
|
||||||
"nix:push" = "cd /etc/nixos && git add -A && git commit -m \"$(date -u +%s)\" && git push";
|
"nix:push" = "cd /etc/nixos && git add -A && git commit -m \"$(date -u +%s)\" && git push";
|
||||||
"nix:pull" = "cd /etc/nixos && git pull";
|
"nix:pull" = "cd /etc/nixos && git pull";
|
||||||
|
"nix:gen-hardware" = "sudo nixos-generate-config --show-hardware-config > /etc/nixos/hardware-configuration.nix";
|
||||||
|
|
||||||
# Utilities
|
# Utilities
|
||||||
"fixaudio" = "systemctl --user restart pipewire pipewire-pulse wireplumber";
|
"fixaudio" = "systemctl --user restart pipewire pipewire-pulse wireplumber";
|
||||||
|
|||||||
Reference in New Issue
Block a user