[TASK] Add sync targets to Makefile

This commit is contained in:
Sebastian Fischer 2026-03-13 20:51:13 +01:00
parent 7eb017eae3
commit 110f27fd9a

View File

@ -6,6 +6,17 @@ SHELL := $(shell which bash)
.SILENT: .SILENT:
.PHONY: sync
sync:
sudo rsync -a --exclude='hardware-configuration.nix' nixos/ /etc/nixos/
sudo nixos-rebuild switch
.PHONY: sync-dry-run
sync-dry-run:
sudo rsync -a --dry-run --verbose --exclude='hardware-configuration.nix' nixos/ /etc/nixos/
.PHONY: add-pre-commit-hook .PHONY: add-pre-commit-hook
add-pre-commit-hook: add-pre-commit-hook:
printf '#!/bin/sh\nmake test\n' > .git/hooks/pre-commit printf '#!/bin/sh\nmake test\n' > .git/hooks/pre-commit