40 lines
742 B
Makefile
40 lines
742 B
Makefile
HOSTNAME := $(shell hostname -s)
|
|
UNAME_S := $(shell uname -s)
|
|
UNAME_M := $(shell uname -m)
|
|
|
|
all:
|
|
doas nixos-rebuild switch --flake .#${HOSTNAME}
|
|
|
|
weekly: pull clean update ci all push
|
|
|
|
cweekly: clean pull all
|
|
|
|
update:
|
|
nix flake update
|
|
|
|
vm:
|
|
doas nixos-rebuild switch --flake .#vm2 && result/bin/run-*-vm
|
|
|
|
clean:
|
|
doas nix-collect-garbage
|
|
doas nix store optimise
|
|
|
|
push:
|
|
@. ~/.bash_ssh
|
|
git push
|
|
|
|
pull:
|
|
@. ~/.bash_ssh
|
|
git pull
|
|
doas nix-prefetch-url file://$$PWD/$$(ls -1 pkgs/linuxx64* | tail -n1)
|
|
doas nix-prefetch-url file://$$PWD/$$(ls -1 pkgs/linuxarm64* | tail -n1)
|
|
|
|
|
|
ci:
|
|
git commit -m"updates from makefile" --all
|
|
|
|
check:
|
|
@nix flake check --show-trace $(ARGS)
|
|
|
|
test: check
|
|
doas nixos-rebuild dry-build --flake ./#$(HOSTNAME)
|