2020-02-17 17:00:59 +04:00
|
|
|
#!/usr/bin/env nix-shell
|
|
|
|
#!nix-shell -p git -i bash
|
|
|
|
|
|
|
|
unset IN_NIX_SHELL
|
|
|
|
|
|
|
|
nixpkgs=$(nix eval --raw '(import ./nix/sources.nix).nixpkgs')
|
|
|
|
|
|
|
|
nix-store --realise $nixpkgs
|
|
|
|
|
2020-04-21 02:29:16 +04:00
|
|
|
export NIX_PATH=nixpkgs=$nixpkgs:nixos-config="`pwd`"
|
2020-02-17 17:00:59 +04:00
|
|
|
|
|
|
|
if [[ -n $INSIDE_EMACS ]]
|
|
|
|
then
|
|
|
|
nix-build $nixpkgs/nixos -A system $@
|
|
|
|
else
|
|
|
|
nix build -f $nixpkgs/nixos system $@
|
|
|
|
fi &&
|
|
|
|
{
|
|
|
|
git add .
|
|
|
|
d=$(date +%s)
|
|
|
|
# The quickest way to commit
|
|
|
|
git commit -t <(echo -n "Update "; echo -n $(git diff HEAD --name-only) | tr "\n" ", ") --no-edit --no-gpg-sign
|
|
|
|
git tag latestBuild --force
|
|
|
|
}
|