diff --git a/makefile b/makefile index adb2381..cfd9525 100644 --- a/makefile +++ b/makefile @@ -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