nix-configs/packages/scripts/nosrebuild
2024-01-11 16:46:11 +01:00

11 lines
341 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
REV=$(curl https://api.github.com/repos/thexyno/nixos-config/branches/main | jq -r .commit.sha)
if [[ $(uname) == "Linux" ]]; then
sudo nixos-rebuild switch --flake "github:thexyno/nixos-config?rev=$REV" -L
else # Darwin
darwin-rebuild switch --flake "github:thexyno/nixos-config?rev=$REV" -L
fi