try new makefile command

This commit is contained in:
Osman Faruk Bayram 2024-10-12 12:03:19 +03:00
parent 7c6b6783e7
commit c7d63609da

View file

@ -8,5 +8,9 @@ check-status:
echo "Git is clean. :)" echo "Git is clean. :)"
build: check-status build: check-status
NIXOS_LABEL := $(shell git rev-parse HEAD) @NIXOS_LABEL=$$(git rev-parse HEAD) && \
sudo nixos-rebuild switch --flake . echo "Setting NixOS label to commit hash: $$NIXOS_LABEL" && \
sudo nixos-rebuild switch --flake . --arg config "'{ system.label = \"$$NIXOS_LABEL\"; }'"
.PHONY: check-status build