nixos-config/justfile

27 lines
733 B
Makefile
Raw Normal View History

beleth-host := "root@88.99.90.90"
2024-07-01 16:08:13 +02:00
beleth-user-host:= "xqtc@88.99.90.90"
2024-07-01 20:36:17 +02:00
default:
@just --choose
rebuild:
2024-07-01 20:36:17 +02:00
#!/usr/bin/env bash
HOSTNAME=$(hostname)
if [ $HOSTNAME == "alastor" ]; then
nh os switch . -- -vv --impure -j 4;
exit
fi
2024-07-01 20:45:31 +02:00
nh os switch . -- -vv;
2024-07-01 20:36:17 +02:00
beleth:
2024-07-01 20:45:31 +02:00
#!/usr/bin/env bash
arch=$(nix-instantiate --eval -E 'builtins.currentSystem')
arch_sanitized=$(echo $arch | sed 's/^"//;s/"$//')
if [ $arch_sanitized == "x86_64-linux" ]; then
nixos-rebuild switch --flake '.#beleth' --build-host {{beleth-host}} --target-host {{beleth-host}};
ssh {{beleth-user-host}} "cd; cd nixos-config; git pull; cd; sh build_website.sh";
exit
fi
@echo "Host arch needs to be 'x86_64-linux'! Aborting...";