makefile | cleanup

This commit is contained in:
Don Harper 2024-04-19 20:37:58 -05:00
parent 90510ee29f
commit 329e309f62

View file

@ -2,11 +2,10 @@ HOSTNAME := $(shell hostname -s)
UNAME_S := $(shell uname -s)
UNAME_M := $(shell uname -m)
all:
@locate home-manager-backup | sort -u | xargs rm -f
all: prep
doas nixos-rebuild build --flake .#${HOSTNAME}
switch:
switch: prep
doas nixos-rebuild switch --flake .#${HOSTNAME}
weekly: pull clean update ci switch push
@ -31,14 +30,6 @@ pull:
doas nix-prefetch-url file://$$PWD/$$(ls -1 src/linuxx64* | tail -n1)
# doas nix-prefetch-url file://$$PWD/$$(ls -1 src/linuxarm64* | tail -n1)
# pocket2 does not really have enough space to do this locally
pocket2:
@ssh pocket2 "locate home-manager-backup | sort -u | xargs rm -f"
@ssh pocket2 "doas nix-collect-garbage --quiet --log-format bar --no-build-output --delete-old"
@nixos-rebuild switch --flake .#pocket2 --target-host root@pocket2
@ssh pocket2 "doas nix-collect-garbage --quiet --log-format bar --no-build-output --delete-old"
@ssh pocket2 "doas nix store optimise"
ci:
git commit -m"updates from makefile" --all
@ -48,3 +39,5 @@ check:
test: check
doas nixos-rebuild dry-build --flake ./#$(HOSTNAME)
prep:
@locate home-manager-backup | sort -u | xargs rm -f