nix-configs/packages/scripts/nosrebuild
Philipp Hochkamp 7d18ec2ac5
fix: nosrebuild
2022-11-04 04:30:43 +01:00

13 lines
428 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"
else # Darwin
darwin-rebuild switch \
--flake "github:thexyno/nixos-config?rev=$REV" \
--override-input private 'git+ssh://git@github.com/thexyno/nixos-config-private'
fi